Skip to content

Instantly share code, notes, and snippets.

Brock BrockA

Block or report user

Report or block BrockA

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BrockA
BrockA / hatoverflow.user.js
Last active Dec 14, 2015
Stack Exchange, Winterbash, Hat Overflow
View hatoverflow.user.js
// ==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/*
@BrockA
BrockA / Add_Timeline_Button_to_Stack_Exchange_questions.user.js
Last active Aug 28, 2019
Adds a link to the timeline view to questions. This is a userscript for Stack Exchange sites.
View Add_Timeline_Button_to_Stack_Exchange_questions.user.js
// ==UserScript==
// @name Stack Exchange: Add Timeline and Revisions links to posts
// @description Adds links to posts to always show history and links to questions to show the Timeline".
// @namespace StackExchange
// @match *://*.askubuntu.com/questions/*
// @match *://*.mathoverflow.net/questions/*
// @match *://*.serverfault.com/questions/*
// @match *://*.stackapps.com/questions/*
// @match *://*.stackexchange.com/questions/*
// @match *://*.stackoverflow.com/questions/*
@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
View waitForKeyElements.js
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@BrockA
BrockA / checkForBadJavascripts_Demo.user.js
Created May 6, 2012
This demonstrates the checkForBadJavascripts function in a complete Greasemonkey script and against a target page (http://jsbin.com/ogudon).
View checkForBadJavascripts_Demo.user.js
// ==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 () {
@BrockA
BrockA / checkForBadJavascripts.js
Created May 6, 2012
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.
View checkForBadJavascripts.js
/*--- 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.
@BrockA
BrockA / Add_kbd_shortcut.user.js
Last active Feb 12, 2017
This is a userscript that adds shortcuts for adding <kbd> tags to posts. Designed for Stack Exchange sites.
View Add_kbd_shortcut.user.js
// ==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/*
You can’t perform that action at this time.