Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Shruggy
- // @namespace http://chat.stackexchange.com/rooms/19/game-development
- // @version 0.1
- // @match http://chat.stackexchange.com/rooms/19/game-development
- // ==/UserScript==
- var theShruggy = "¯\\\\(°_o)/¯"
- var shruggyButtonText = "¯\\(°_o)/¯"
- var buttonsContainer = document.getElementById("chat-buttons");
- var shruggyButton = document.createElement("button");
- shruggyButton.setAttribute("class", "button");
- shruggyButton.setAttribute("id", "shrugButton");
- shruggyButton.innerHTML = shruggyButtonText;
- buttonsContainer.appendChild(shruggyButton);
- /* Handle paste events */
- function shrugClickHandler(e) {
- var inputBox = document.getElementById("input");
- inputBox.value = inputBox.value + theShruggy;
- }
- document.getElementById("shrugButton").addEventListener("click", shrugClickHandler);
Advertisement
Add Comment
Please, Sign In to add comment