Created
March 23, 2018 08:01
-
-
Save Lewiscowles1986/e72af574565d2f10514dd34cda0794bc to your computer and use it in GitHub Desktop.
Moving SLoyalty & LiveChat out of my way for full-page screenies
This file contains 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
var ensure_ss = function() { | |
let sel = '#sloyalty-display, #livechat-compact-container, .sloyalty-tab-widget[name="sloyalty-loyalty-widget-iframe"]'; | |
[].slice.call(document.querySelectorAll(sel)).forEach(function(elem){ | |
elem.style.position="absolute"; | |
}); | |
console.log('document mutation detected') | |
}; | |
var observer = new MutationObserver(ensure_ss); | |
observer.observe(document, { childList: true }); | |
document.addEventListener("DOMNodeInserted", ensure_ss, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment