Use during overrides
Created
July 13, 2021 12:09
-
-
Save kcak11/e153c8b6415ca315af6c5e19eb6913c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
setTimeout(function () { | |
document.querySelectorAll("script[src]").forEach(function (s) { | |
var scr = document.createElement("script"); | |
scr.src = s.src; | |
scr.type = s.type || "text/javascript"; | |
document.querySelector("head").appendChild(scr); | |
}); | |
}, 200); | |
setInterval(function () { | |
document.querySelectorAll("img[src*=\".svg\"]").forEach((im) => { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("get", im.src, true); | |
xhr.onreadystatechange = function () { | |
if (this.readyState === 4 && this.status === 200) { | |
im.src = "data:image/svg+xml;base64," + btoa(this.responseText); | |
} | |
}; | |
xhr.send(null); | |
}); | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment