Skip to content

Instantly share code, notes, and snippets.

View mogsdad's full-sized avatar

David Bingham mogsdad

View GitHub Profile
@mogsdad
mogsdad / CVReminder.user.js
Last active January 7, 2016 19:40
Display a notice at top of questions, showing whether you've already close-voted.
// ==UserScript==
// @name Close Vote Reminder
// @namespace https://gist.github.com/mogsdad/767f8adc04d1d5c732c9
// @version 0.2
// @description Display a notice at top of questions with their status wrt close votes.
// @author Mogsdad
// @include /^https?:\/\/\w*.?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com\/(questions|posts|review)\/\d+\/.*/
// @grant none
// ==/UserScript==
/* jshint -W097 */
@mogsdad
mogsdad / getLayoutString.gs
Created December 12, 2015 03:45
Google Apps Script utility to Get the string representing a PositionedLayout enum. See https://mogsdad.wordpress.com.
/**
* Get the string representing the given PositionedLayout enum.
* Ref: https://developers.google.com/apps-script/reference/document/positioned-layout
*
* From: gist.github.com/mogsdad/7fed0b18837b9027f968
* See: stackoverflow.com/a/20661113/1677912
*
* @param {PositionedLayout} PositionedLayout Enum value.
*
* @returns {String} English text matching enum.
@mogsdad
mogsdad / getAllPositionedImages.gs
Last active June 12, 2018 21:51
Google Apps Script function to retrieve a list of all PositionedImages in a document. See https://mogsdad.wordpress.com.
/**
* Get a list of all PositionedImages in a document.
* From: gist.github.com/mogsdad/600bbb24ecb360da7d8c
* See: stackoverflow.com/a/20661113/1677912
*
* @param {String} docId (optional) ID of document to scan
*
* @returns {PositionedImage[]} Array of PositionedImages in document
*/
function getAllPositionedImages( docId ) {
@mogsdad
mogsdad / DemoPositionedImage.gs
Created December 12, 2015 03:30
Google Apps Script demo of new PositionedImages. See https://mogsdad.wordpress.com.
/**
* Demo of PositionedImages.
* From: gist.github.com/mogsdad/e65826da9974650e2abc
* See: stackoverflow.com/a/20661113/1677912
**/
function DemoPositionedImage() {
// Get handle on active document
var doc = DocumentApp.getActiveDocument();
// Find desired image file
// ==UserScript==
// @name Stack Overflow Real Dark
// @namespace http://github.com/TinyGiant/
// @description Real dark styling for Stack Overflow and some Stack Exchange sites
// @author @TinyGiant
// @run-at document-start
// @version 1.0.1.1m
// @include /^https?:\/\/.*\.?stack(overflow|exchange).com/.*$/
// ==/UserScript==
@mogsdad
mogsdad / FindMyLastChatMsg.user.js
Created October 30, 2015 14:29
Find user's last posted message in a StackExchange chat room
// ==UserScript==
// @name FindMyLastChatMsg
// @author Mogsdad
// @contributor Siguza
// @namespace chat.stackoverflow
// @description Find user's last posted message in a StackExchange chat room
// @include /^https?://chat.(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/rooms/.*/
// @version 1.0.0.0
// @grant none
// ==/UserScript==
@mogsdad
mogsdad / loadReview.user.js
Last active October 2, 2015 20:51
When on a Stack Exchange network review tab, periodically checks whether there is a review available.
// ==UserScript==
// @name Load review
// @namespace https://gist.github.com/mogsdad/50c5a3e9686cf0a8867f
// @version 1.2
// @description When on a Stack Exchange network review tab, periodically checks whether there is a review available.
// @author David Bingham (Mogsdad)
// @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/review/*/
// @grant none
// ==/UserScript==
@mogsdad
mogsdad / zapHelpAndImrovement.user.js
Created October 1, 2015 18:28
I don't enjoy the Help and Improvement review queue on SO, so I don't want to see it anymore!
// ==UserScript==
// @name zapHelpAndImrovement
// @namespace zapHelpAndImrovement
// @description Suppress the Help and Improvement review queue
// @include http://stackoverflow.com/review
// @version 1
// @grant none
// ==/UserScript==
$('div').has('a[href="/review/helper"]').closest('.dashboard-item').remove();
@mogsdad
mogsdad / Roomba-VTZ.user.js
Last active September 25, 2015 02:47
Presents a set of buttons to quickly down-vote questions & answers for automatic deletion. (AKA Roomba candidates) See documentation:http://stackapps.com/questions/6599/roomba-vtz-vote-to-zero.
// ==UserScript==
// @name Roomba-VTZ (Vote-to-zero)
// @namespace https://gist.github.com/mogsdad/ed30af363a376ec4a1c2
// @version 1.2
// @description Presents a set of buttons to quickly down-vote questions & answers for automatic deletion. (AKA Roomba candidates)
// @author David Bingham (Mogsdad)
// @include /^https?://(meta\.)?(stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com/questions/[0-9]+.*/
// @grant none
// ==/UserScript==
@mogsdad
mogsdad / TaggedQuestionList.user.js
Last active February 27, 2018 21:06 — forked from WillSullivan/TaggedQuestionList.userscript
This userscript will add a list (initially hidden in an expandable div) containing links to every question listed on a tag page (i.e., questions/tagged/something). When a link in this list is clicked, it goes away. This allows you to easily open up many questions with this tag at the same time. Simply ctrl-click on the first link, then keep clic…
// ==UserScript==
// @name Tag list
// @namespace https://stackapps.com/questions/4207/burninator-toolkit
// @author Will Sullivan (Will)
// @developer David Bingham (Mogsdad)
// @version 1.2.10
// @grant none
// @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
// @include /^https?:\/\/(?:meta.)?(?:stackoverflow|stackexchange|serverfault|superuser|askubuntu|stackapps)\.com(?:\/(?:\?|questions(?:$|\/tagged|\?)|search|unanswered).*)?$/
// https://regex101.com/r/1D5jof/3