-
-
Save elbywan/d3c853259940fd0ac8a9315f0c360389 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
const createElementBackup = document.createElement | |
document.createElement = function(...args) { | |
// If this is not a script tag, bypass | |
if(args[0].toLowerCase() !== 'script') | |
// Binding to document is essential | |
return createElementBackup.bind(document)(...args) | |
const scriptElt = createElementBackup.bind(document)(...args) | |
// Do some magic, see below | |
return scriptElt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment