Created
December 8, 2020 00:11
-
-
Save stackcoder/088fc9da814213cbcf8fc1f278872526 to your computer and use it in GitHub Desktop.
Unblock Instagram scroll lock
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
// ==UserScript== | |
// @name Unblock Instagram scroll lock | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author You | |
// @match https://www.instagram.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const targetNode = document.querySelector('body'); | |
const observer = new MutationObserver(() => { | |
if (targetNode.hasAttribute('style')) { | |
targetNode.removeAttribute('style'); | |
} | |
observer.takeRecords(); | |
}); | |
observer.observe(targetNode, {attributes: true, childList: false, subtree: false}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment