Skip to content

Instantly share code, notes, and snippets.

View baldwicc's full-sized avatar

Chris Baldwin baldwicc

View GitHub Profile
@baldwicc
baldwicc / qut-bbcssfix.js
Last active December 22, 2015 03:29
Forcibly reloads CSS files if it appears that they didn't load correctly, when given a specific HTML element and a bad (and/or good) css rule to check against.
/**
* qut-bbcssfix
* @author Christopher Baldwin [https://staff.qut.edu.au/details?id=baldwicc]
* @licence Simplified BSD License
* @source https://gist.github.com/baldwicc/6410608
*/
/* Usage:
- Set elem_to_check and style_to_check to a style that doesn't appear to load correctly
- Set bad_value to the default css rule applied to this element (eg: "none")
@baldwicc
baldwicc / qut-inlinewarnings.js
Last active December 21, 2015 22:09
Adds a native lightbox based on url regex, or a native inline messages based on matching css selectors. Useful when decommissioning tools.
/** qut-inlinewarnings
* Adds a native lightbox based on url regex, or a native inline messages based on matching css selectors. Useful when decommissioning tools.
*
* - Uses .html resources for lightbox iframes
* - Only shows lightbox once a day
* - Useful for building block pages, or standard pages with content items
* - Tracks to GA
*
* @author Christopher Baldwin [https://staff.qut.edu.au/details?id=baldwicc]
* @licence Simplified BSD License
@baldwicc
baldwicc / qut-pagetitles.js
Last active December 21, 2015 20:39
PRD: Topframe Hacks for Bb Learn. Customises page titles, sets a frameset-wrapped url of current content page location in the address bar, and customises banner to open in same window.
/* jshint strict: false */
/* global Event, $$ */
/**
* qut-pagetitles
* @author Christopher Baldwin [https://staff.qut.edu.au/details?id=baldwicc]
* @license Simplified BSD License
* @source [https://gist.github.com/baldwicc/6362607]
*/
/*
Usage:
@baldwicc
baldwicc / qut-stickyfooter.js
Last active December 21, 2015 20:39
Stick Footer for Blackboard Learn
/**
* qut-stickyfooter
* @author Christopher Baldwin [https://staff.qut.edu.au/details?id=baldwicc]
* @licence Simplified BSD License
* @source https://gist.github.com/baldwicc/6362546
*/
/*
Usage:
- Point options.csspath at a stylesheet, and edit html.footer as appropriate
@baldwicc
baldwicc / qut-jqueryqueue.js
Last active October 23, 2018 06:39
Loads jQuery asynchronously, then executes queue of functions from an array. After queue is flushed, functions .push()'d to the queue will execute immediately.
/**
* qut-jqueryqueue
* @author Christopher Baldwin [https://staff.qut.edu.au/details?id=baldwicc]
* @licence Simplified BSD License
* @source https://gist.github.com/baldwicc/6315577
*/
/*
Exaple of usage: