-
-
Save petzku/21c66365005098688aad08846f7e973e to your computer and use it in GitHub Desktop.
Sanuli emoji copy-paste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "minified", copy-paste this into a bookmarklet URL | |
javascript: (() => {$=(...args)=>document.querySelector(...args);h=$("h1").textContent.replace("#","");s="";n=0;d=$("div.board-6");for(row of d.children){if(row.children[0].classList[1]!=="unknown"){s+="\n";for(letter of row.children){cl=letter.classList[1];s+=cl[0]}n++}}s=s.replaceAll('a','⬛').replaceAll('p','🟨').replaceAll('c','🟩');r=h+" "+n+"/6\n"+s;navigator.clipboard.writeText(r)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rakenna wordlen share-napin tyylisesti emojeilla helposti jaettava viesti | |
function convert_to_emoji() { | |
$ = (...args) => document.querySelector(...args); | |
h = $("h1").textContent.replace("#",""); | |
s = ""; n = 0; | |
d = $("div.board-6"); | |
for (row of d.children) { | |
if (row.children[0].classList[1] !== "unknown") { | |
s += "\n"; | |
for (letter of row.children) { | |
cl = letter.classList[1]; | |
s += cl[0]; | |
} | |
++n; | |
} | |
} | |
s = s.replaceAll('a', '⬛').replaceAll('p', '🟨').replaceAll('c', '🟩'); | |
r = h + " " + n + "/6\n" + s; | |
navigator.clipboard.writeText(r); | |
return r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment