Skip to content

Instantly share code, notes, and snippets.

@corwin-of-amber
Last active May 9, 2017 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corwin-of-amber/7bd351fed976f9336b294db08034d0e1 to your computer and use it in GitHub Desktop.
Save corwin-of-amber/7bd351fed976f9336b294db08034d0e1 to your computer and use it in GitHub Desktop.
// ==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);
});
@corwin-of-amber
Copy link
Author

This script requires Greasemonkey. Install the plugin, then drag the file into Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment