-
-
Save elbywan/5f554606e4bfaff5d7efd59f77d86cc0 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
// Assume that this code is executed inside the mutation observer callback: | |
addedNodes.forEach(node => { | |
// See above for script tag checks… | |
// Safari has this additional event which prevents scripts from loading | |
const beforeLoadListener = function (event) { | |
event.preventDefault() | |
}) | |
node.addEventListener('beforeload', beforeLoadListener) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment