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_xmlhttpRequest Basic Test | |
// ==/UserScript== | |
dump('starting gm_xhr ...'); | |
try { | |
GM_xmlhttpRequest({ | |
method: "GET", |
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 Access Key Test | |
// ==/UserScript== | |
GM_registerMenuCommand( | |
"Menu command, with Access Key", | |
function() { dump("Menu command w/Access Key runs.\n"); }, | |
null, null, | |
"A"); |
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 Accelerator Test | |
// ==/UserScript== | |
GM_registerMenuCommand( | |
"Menu command, with Accelerator", | |
function() { dump("Menu command w/Accelerator runs.\n"); }, | |
"c", "control shift"); |
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 Simple Test | |
// ==/UserScript== | |
GM_registerMenuCommand( | |
"Simple menu command", | |
function() { dump("Simple menu command runs.\n"); }); |
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() accelerator tester | |
// @namespace http://arantius.com/misc/greasemonkey/ | |
// @description A flexible test script for examining if/how GM_rmc's accelerator keys work | |
// @include about:blank#GM_rmc | |
// @resource ui.html https://gist.github.com/raw/898642/ui.html | |
// ==/UserScript== | |
var windowId = String(Math.random()).substr(2); |
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() Randomized Test | |
// @include http* | |
// ==/UserScript== | |
var id = String(Math.random()).substr(3); | |
GM_registerMenuCommand( | |
"Menu command "+id, | |
function() { unsafeWindow.dump("Menu command "+id+" runs.\n"); }); |
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_xmlhttpRequest Alert Interference Test | |
// @include http* | |
// ==/UserScript== | |
// Uses unsafeWindow.dump() because of | |
// https://github.com/greasemonkey/greasemonkey/issues#issue/1229 | |
function doSampleXhr() { | |
unsafeWindow.dump('starting gm_xhr ...'); |
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 alert() + setTimeout() tester | |
// @include http* | |
// ==/UserScript== | |
alert('alert 1'); | |
setTimeout(function() { alert('alert 2'); }, 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
// ==UserScript== | |
// @name Duplicate Metadata Test (FIRST) | |
// @name Duplicate Metadata Test (SECOND) | |
// @namespace https://github.com/arantius#FIRST | |
// @namespace https://github.com/arantius#SECOND | |
// @description Test what happens when single-value metadata (@name, @description, etc.) is listed twice. Each should say SECOND or 2, not FIRST or 1. (FIRST) | |
// @description Test what happens when single-value metadata (@name, @description, etc.) is listed twice. Each should say SECOND or 2, not FIRST or 1. (SECOND) | |
// @icon http://www4d.wolframalpha.com/Calculate/MSP/MSP61719f4fag722076ge000005behc1e440b1gcg6?MSPStoreType=image/gif&s=62&w=8&h=20 | |
// @icon http://www4d.wolframalpha.com/Calculate/MSP/MSP594619f4f1g9g975d57400002ga4i0gf41iceeef?MSPStoreType=image/gif&s=34&w=8&h=20 | |
// @version 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 Icon change tester. | |
// @description Test what happens when you edit the @icon line of a script. | |
// @namespace https://github.com/arantius | |
// @include http* | |
// @exclude *gist* | |
// @icon http://iconpacks.mozdev.org/images/deerpark-lite.png | |
// ==/UserScript== | |
/* |