Skip to content

Instantly share code, notes, and snippets.

@Eskuero
Last active August 17, 2018 12:34
Show Gist options
  • Save Eskuero/af7516218b7dd006abd6934681026c56 to your computer and use it in GitHub Desktop.
Save Eskuero/af7516218b7dd006abd6934681026c56 to your computer and use it in GitHub Desktop.
GreaseMonkey script to allow easy typing of hacker font in niu.moe Download the extension and open the raw link of the following file to install: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
// ==UserScript==
// @name Hacker buttons
// @version 1
// @include *niu.moe*
// @grant none
// ==/UserScript==
setTimeout(function() {
hackerbutton = document.createElement("img");
hackerbutton.src = "https://cdn.niu.moe/custom_emojis/images/000/004/734/original/934bc263da8d1735.png";
hackerbutton.width = "26";
hackerbutton.onclick = function() { hacker() };
document.getElementsByClassName("emoji-picker-dropdown")[0].appendChild(hackerbutton);
}, 3000);
function hacker() {
text = prompt("Type your message:");
emojiform = "";
for (i = 0; i < text.length; i++) {
if (text[i] != " ") {
var letter = text[i].toLowerCase();
emojiform += ":hacker_" + letter + ": ";
} else {
emojiform += "\n";
}
}
document.getElementsByClassName("autosuggest-textarea__textarea")[0].value = emojiform;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment