-
-
Save kdrag0n/71a3faa97812fcbee0846ea0a1734617 to your computer and use it in GitHub Desktop.
βπππ£πππ πππ π₯ππ π₯πππππ€: βπππ£π‘ β πππ π π½π ππ₯
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
let csetSrc = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | |
let csetDest = ['π','π','π','π','π','π','π','π','π','π','π','π','π','π','π ','π‘','π’','π£','π€','π₯','π¦','π§','π¨','π©','πͺ','π«','πΈ','πΉ','β','π»','πΌ','π½','πΎ','β','π','π','π','π','π','β','π','β','β','β','π','π','π','π','π','π','π','β€','π','π','π','π','π','π','π','π','π ','π‘'] | |
for (let el of document.querySelectorAll('*')) { | |
// ignore non-user-visible | |
if (el.style.display == 'none' || el.style.visibility == 'hidden') { | |
continue | |
} | |
if (el.tagName == 'SCRIPT' || el.tagName == 'STYLE' || el.tagName == 'TEXTAREA') { | |
continue | |
} | |
// get text content | |
if (!el.firstChild) { | |
continue | |
} | |
let text = el.firstChild.nodeValue | |
if (!text) { | |
continue | |
} | |
let oldText = text | |
// replace all characters in csetSrc with corresponding characters in csetDest | |
for (let i = 0; i < csetSrc.length; i++) { | |
text = text.replaceAll(csetSrc[i], csetDest[i]) | |
} | |
el.firstChild.nodeValue = text | |
console.log(`replaced ${oldText} with ${text}`) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment