Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- if (document.getElementById("qr")) inject();
- document.addEventListener("QRDialogCreation", () => inject());
- document.addEventListener("click", e => {
- if (e.target.classList.contains("xa-em-emote")) {
- // Prevent event from adding unnecessary null in the field if
- // you click on cancel when attempting to unlock a new emote
- if (!(e.target.getAttribute("data-tip"))) return;
- document.querySelector("#qr textarea[data-name=com]").value += e.target.getAttribute("data-tip");
- }
- })
- function inject() {
- if (document.querySelector("script[src*=emotes2022]")) {
- const button = document.createElement("div");
- button.style = "display:inline-block;cursor:pointer;float:right";
- button.setAttribute("data-xa-cmd", "open");
- button.innerHTML = "🙂";
- document.querySelector("#qr .persona").appendChild(button)
- }
- }
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement