Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //TODO Add a settings folder
- let autorun = true;
- //TODO Change to in computer files, quicker load times
- const imageLocation = "https://i.kym-cdn.com/photos/images/newsfeed/000/754/539/566.gif"
- function main(){
- if(autorun)
- RunDiofy();
- }
- //DIOfies the DOM
- function RunDiofy(){
- document.addEventListener("load",turnEveryImageToDio())
- //Observes mutations to the dom, calls out a callback function when notices a mutation to the body
- const mutationObserverConfig = {attributes:true, childlist:true, subtree: true};
- let observer = new MutationObserver(turnEveryImageToDio);
- observer.observe(document,mutationObserverConfig);
- }
- function turnEveryImageToDio()
- {
- //Turns every image to dio before loading JS.
- let images = document.getElementsByTagName("img");
- //img stands for image
- for(let img of images){
- img.src = imageLocation;
- }
- return images.length;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement