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
(function() { | |
var old = document.write; | |
document.write = function( content ) { | |
if ( "interactive" === document.readyState ) { | |
console.log("document.write called after page load: ", content ); | |
// optional.. safely append the content | |
// document.body.appendChild( content ); | |
return; | |
} |
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
define( "constants", [ "utils" ], function( Utils ) { | |
/** | |
* _constants is a private object that will hold the | |
* constant values. Hidden behind a closure to prevent | |
* modules from changing "constant" values once set. | |
* @type {Object} | |
*/ | |
var _constants = {}, | |
/** |
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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
%placeholder { | |
width: 100px; | |
height: 100px; | |
} | |
%placeholder { |
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
var Mediator = { | |
channels: {}, | |
subscribe: function( channel, fn, ctx ){ | |
var channels = this.channels; | |
if ( !channels[ channel ] ){ channels[ channel ] = []; } | |
channels[ channel ].push({ context: ctx || this, callback: fn }); | |
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
var transEndEvent = { | |
'WebkitTransition': 'webkitTransitionEnd', | |
'MozTransition' : 'transitionend', | |
'OTransition' : 'oTransitionEnd otransitionend', | |
'msTransition' : 'MSTransitionEnd', | |
'transition' : 'transitionend' | |
}[ Modernizr.prefixed('transition') ]; |
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
// base _article.scss | |
// ------------------ | |
.article-hed { | |
@extend %layout-article-hed; | |
@extend %type-article-hed; | |
} | |
.article-dek { | |
@extend %layout-article-dek; | |
@extend %type-article-dek; |
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
/*jshint browser:true */ | |
/*global _ */ | |
//requires underscore.js for debounced function | |
(function(win, _){ | |
"use strict"; | |
var width = win.innerWidth, | |
handleResize; | |
win.pixelToPercent = function pixelToPercent(pixel){ |
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
function getParams(key){ | |
var url = window.location.href, | |
params = {}, i; | |
url = url.split('#')[0].split('?')[1]; | |
if ( !url ) return undefined; | |
url = url && url.split('&'); | |
while ( i = url.shift() ){ | |
i = i.split('='); | |
params[ i[0] ] = i[1] || true; | |
} |
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
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
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
/*jshint devel:true */ | |
(function(){ | |
"use strict"; | |
var toDollarAmount = function toDollarAmout(amount, returnAsString){ | |
var ret; | |
if ( 'number' !== typeof amount ){ | |
return false; | |
} | |
ret = amount.toFixed(2); | |
return ( returnAsString ) ? '$' + ret : +ret; |
NewerOlder