Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import csv
import re
import sys
################################################################################
# Good reference: http://www.get-firefox.eu/default_025.html
app_ids={
#!/usr/bin/env python
import Image
import ImageEnhance
import logging
import math
edge_buffer=25
black_threshold=96
search_indicator=None
#!/usr/bin/env python
import fnmatch
import operator
import re
import string
import sys
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
// ==UserScript==
// @name Custom Include Tester
// @namespace test
// @description Test custom includes with 0.8 -> 0.9 upgrade path
// @exclude *
// ==/UserScript==
alert("If you're seeing this, then user-set include/exclude rules work.");
// ==UserScript==
// @name Greasemonkey Works
// @namespace test
// @description If you see an alert when loading appropriate pages, then this script works, and thus Greasemonkey works!
// @include http://www.example.com/
// ==/UserScript==
alert("If you're seeing this, then Greasemonkey works.");
const GLOBAL_CONSTANT_NAME = 1;
function plainGlobalFunction() { };
function GlobalConstructor() { };
GlobalConstructor.prototype.anonymousAssignedToPrototype = function() { };
GlobalConstructor.prototype.namedAssignedToPrototypeOL = function GlobalConstructor_namedAssignedToPrototypeOL() { };
GlobalConstructor.prototype.namedAssignedToPrototypeNL =
function GlobalConstructor_namedAssignedToPrototypeNL() { };
// ==UserScript==
// @name GM_setValue Test
// @description Test what happens to GM_setValue() values, across installs.
// ==/UserScript==
var i = GM_getValue('i', 0);
i++;
GM_setValue('i', i);
dump('GM_setValue Test has run ' + i + ' times.\n');
// ==UserScript==
// @name test: var x = y = 0;
// @include *
// ==/UserScript==
var x = y = 0;
alert('a');
// ==UserScript==
// @name eval test
// @include *
// ==/UserScript==
eval("alert('eval test')")
alert("Relative @require works!");