Skip to content

Instantly share code, notes, and snippets.

@stackcoder
Created December 8, 2020 00:11
Show Gist options
  • Save stackcoder/088fc9da814213cbcf8fc1f278872526 to your computer and use it in GitHub Desktop.
Save stackcoder/088fc9da814213cbcf8fc1f278872526 to your computer and use it in GitHub Desktop.
Unblock Instagram scroll lock
// ==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