Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name New Userscript
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://*.instagram.com/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- const callback = function(mutationsList, observer) {
- mutationsList.forEach(function(mutation) {
- if (mutation.addedNodes && mutation.addedNodes.length > 0) {
- const modalThing = [].find.call(mutation.addedNodes, function(el) {
- console.log(el);
- return el.getAttribute('role') === 'presentation';
- });
- if (modalThing) {
- modalThing.remove();
- document.body.style["overflow"] = 'inherit';
- setTimeout(function() {document.body.style["overflow"] = 'inherit';}, 400); }
- }
- });
- }
- new MutationObserver(callback).observe(document.body, {attributes: true, childList: true, characterData: true});
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement