Created
June 28, 2023 20:35
-
-
Save iczero/30cb9930bff92ff5cf55d492ada69d77 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
// fix encoding (utf-8 misinterpreted as latin1) | |
derp=(s,...n)=>n.map(v=>v.wholeText?v.data=s(v.data):derp(s,...v.childNodes));derp(s => (new TextDecoder).decode(new Uint8Array(s.split('').map(c => c.charCodeAt(0)))), document.body) | |
// rewrite entire page to derp | |
derp=(s,...n)=>n.map(v=>v.wholeText?v.data=s(v.data):derp(s,...v.childNodes));derp(s=>s.replace(/\w+/g,'derp'),document.body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment