Last active
May 9, 2017 03:03
-
-
Save corwin-of-amber/7bd351fed976f9336b294db08034d0e1 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name LeaveMeAlone | |
// @namespace corwin.amber | |
// @description Prevents the leave confirmation dialog | |
// @include http://*.shinezone.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
console.log("Leave me!"); | |
console.log(window.location); | |
window.onbeforeunload = null; | |
/* also prevent redundant horiz scrolling of the contents of the iframe */ | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = 'body { overflow: hidden; }'; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
$("li.play").mousedown(() => { | |
var obj = $('object'); | |
var parent = obj.parent(); | |
var html = parent.html(); | |
parent.empty(); | |
parent.html(html); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script requires Greasemonkey. Install the plugin, then drag the file into Firefox.