Skip to content

Instantly share code, notes, and snippets.

View montlebalm's full-sized avatar
✌️

Chris Montrois montlebalm

✌️
  • Airtable
  • Louisville, CO
View GitHub Profile
@montlebalm
montlebalm / container-example.js
Last active December 23, 2015 18:39
An example of loading an F2 app with real AMD.
// AppClass
define("com_markit_header", ["F2.Defer", "F2", "MyCoolClass"], function(defer, F2) {
var AppClass = function() {};
return AppClass;
});
@montlebalm
montlebalm / F2.BaseAppClass.js
Last active December 22, 2015 16:19
F2 AMD - Example usage of an F2 container and app using AMD
define("F2.BaseAppClass", ["F2.Events", "F2.Defer"], function(events, defer) {
var AppClass = function() {};
// Init function that will be called by F2 automatically
// You probably don't want to override this, but you can
AppClass.prototype.init = function(appId, instanceId, context) {
var self = this;
this.appId = appId;
@montlebalm
montlebalm / reddit_diablo_spoiler.js
Created May 17, 2012 17:13
r/diablo spoiler hider
// ==UserScript==
// @name Spoiler hider
// @description Hide spoilers on the page without the subreddit theme
// @author Chris Montrois
// @include *reddit.com/r/diablo/
// @version 1.0
// ==/UserScript==
// A function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {