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 location.replace test | |
// @namespace test | |
// @include * | |
// @version 1 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
if(window.location.href.indexOf("anchor") == -1) { | |
alert("Replacing location"); |
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 Break GMail Test | |
// @namespace test | |
// @include https://mail.google.com/* | |
// @include http://mail.google.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
j = 0; |
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
diff --git a/content/browser.js b/content/browser.js | |
index e6e9556..13d1c27 100644 | |
--- a/content/browser.js | |
+++ b/content/browser.js | |
@@ -335,6 +335,16 @@ function GM_showPopup(aEvent) { | |
GM_MenuCommander.onPopupShowing(menuCommandPopup); | |
} | |
+/** | |
+ * Clean up the menu after it hides to prevent memory leaks |
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 GM_registerMenuCommand Zombie Compartment Test | |
// @namespace ventero.de | |
// @include * | |
// ==/UserScript== | |
GM_registerMenuCommand("foo", function(){alert("click");}); |
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 Anonymous function wrap test | |
// @namespace ventero.de | |
// @include * | |
// ==/UserScript== | |
alert("Script running"); | |
return; |
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 Timeout additional parameter test | |
// @namespace ventero.de | |
// @include * | |
// @version 1 | |
// ==/UserScript== | |
setTimeout(function(a, b){alert(a.foo + "//" + typeof b)}, 0, {foo:1}, {}); |
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 GM_openInTab test | |
// @namespace ventero.de | |
// @include https://github.com/* | |
// ==/UserScript== | |
alert("typeof GM_openInTab() is " + typeof GM_openInTab("http://www.google.com")); |
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 Late injection test | |
// @namespace ventero | |
// @include * | |
// @require https://gist.github.com/raw/1159592/883c27709814b7066708e50c51522937ab37678d/require.js | |
// ==/UserScript== | |
if(typeof requiredScript === "undefined") requiredScript = "not present"; | |
alert("Injected!\ndocument.readyState is " + document.readyState + "\n required script is " + requiredScript); |
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 test: top = 0; | |
// @include * | |
// ==/UserScript== | |
top = 0; | |
alert('a'); |