View waitForKeyElements.js
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
View extract_tampermonkey_script.py
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
#!/usr/bin/env python | |
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>" | |
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf" | |
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/" | |
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/" | |
import leveldb | |
import sys | |
import re |
View checkForBadJavascripts.js
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
/*--- checkForBadJavascripts() | |
This is a utility function, meant to be used inside a Greasemonkey script that | |
has the "@run-at document-start" directive set. | |
It Checks for and deletes or replaces specific <script> tags. | |
*/ | |
function checkForBadJavascripts (controlArray) { | |
/*--- Note that this is a self-initializing function. The controlArray | |
parameter is only active for the FIRST call. After that, it is an | |
event listener. |
View checkForBadJavascripts_Demo.user.js
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 _Replace evil Javascript | |
// @include http://jsbin.com/ogudon* | |
// @run-at document-start | |
// ==/UserScript== | |
/****** New "init" function that we will use | |
instead of the old, bad "init" function. | |
*/ | |
function init () { |
View Add_kbd_shortcut.user.js
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 OBSOLETE: StackExchange, Add kbd shortcut | |
// @description Adds a button and a keyboard shortcut (Alt-K) to add <kbd> tags. | |
// @version 1.3 | |
// @match *://*.askubuntu.com/* | |
// @match *://*.onstartups.com/* | |
// @match *://*.serverfault.com/* | |
// @match *://*.stackapps.com/* | |
// @match *://*.stackexchange.com/* | |
// @match *://*.stackoverflow.com/* |
View hatoverflow.user.js
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 Stack Exchange, Winterbash, Hat Overflow | |
// @description Adds how many Winterbash hats each user has, into the "signature blocks" of posts. | |
// @match *://*.askubuntu.com/* | |
// @match *://*.mathoverflow.net/* | |
// @match *://*.onstartups.com/* | |
// @match *://*.serverfault.com/* | |
// @match *://*.stackapps.com/* | |
// @match *://*.stackexchange.com/* | |
// @match *://*.stackoverflow.com/* |