Skip to content

Instantly share code, notes, and snippets.

@arantius
arantius / Karma_Blocker_Default_Rules.ini
Created March 7, 2011 01:42
The default rules for a Karma Blocker installation.
# This is a ruleset configuration for Karma Blocker. For more information, see:
# http://trac.arantius.com/wiki/Extensions/KarmaBlocker
# This default ruleset is intended to be demonstrative: making productive
# use of all the features that the Karma Blocker rule syntax provides. It
# should generally work, but it has intentionally not been tweaked to deal
# with the particulars of any given site. All rules here are intended to
# explain what can be done, and how it can be done, while remaining as
# generic as possible, with limited exceptions. You the user are expected
# to tweak and customize these rules.
@arantius
arantius / app.yaml
Created March 21, 2011 19:58
angular .save() / .get() confusion test case
application: angular-resource-save-test
version: 1
runtime: python
api_version: 1
handlers:
- url: /
static_files: index.html
upload: index.html
@arantius
arantius / gm-xhr-test-case.user.js
Created March 26, 2011 22:04
test case for GM_xmlhttpRequest
// ==UserScript==
// @name GM_xmlhttpRequest Basic Test
// ==/UserScript==
dump('starting gm_xhr ...');
try {
GM_xmlhttpRequest({
method: "GET",
@arantius
arantius / gm_rmc-simple-test.user.js
Created March 27, 2011 21:03
the simplest possible GM_registerMenuCommand test
// ==UserScript==
// @name GM_registerMenuCommand Simple Test
// ==/UserScript==
GM_registerMenuCommand(
"Simple menu command",
function() { dump("Simple menu command runs.\n"); });
@arantius
arantius / gm_rmc-access-key-test.user.js
Created March 27, 2011 21:07
GM_registerMenuCommand Access Key Test
// ==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");
@arantius
arantius / gm_rmc-accelerator-test.user.js
Created March 27, 2011 21:10
GM_registerMenuCommand Accelerator Test
// ==UserScript==
// @name GM_registerMenuCommand Accelerator Test
// ==/UserScript==
GM_registerMenuCommand(
"Menu command, with Accelerator",
function() { dump("Menu command w/Accelerator runs.\n"); },
"c", "control shift");
@arantius
arantius / gm-rmc-accelerator-tester.user.js
Created April 1, 2011 18:51
GM_registerMenuCommand() accelerator tester
// ==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);
@arantius
arantius / gm-rmc-randomized-test.user.js
Created April 4, 2011 21:59
Generates a random ID, puts it in the page, and in a registered menu command
// ==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"); });
@arantius
arantius / gm_xhr-alert-test.user.js
Created April 6, 2011 19:26
GM_xmlhttpRequest Alert Interference Test
// ==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 ...');
@arantius
arantius / alert+settimeout.user.js
Created April 8, 2011 20:20
alert() + setTimeout() tester
// ==UserScript==
// @name alert() + setTimeout() tester
// @include http*
// ==/UserScript==
alert('alert 1');
setTimeout(function() { alert('alert 2'); }, 0);