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
/** | |
* Disable hover events on scroll | |
* @see http://www.thecssninja.com/javascript/pointer-events-60fps | |
*/ | |
var root = document.documentElement, timer; | |
window.addEventListener( 'scroll', function() { | |
clearTimeout( timer ); |
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
// Make punctuation smarter | |
jQuery.fn.smarten = (function() { | |
function smartenNode(node) { | |
if (node.nodeType === 3) { | |
node.data = node.data | |
.replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // Opening singles | |
.replace(/'/g, "\u2019") // Closing singles & apostrophes | |
.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201c") // Opening doubles | |
.replace(/"/g, "\u201d") // Closing doubles |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme", | |
"flatland_sidebar_tree_large": true, | |
"flatland_square_tabs": true, | |
"font_size": 15, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |
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
/** | |
* Node Maker Function | |
* @author Kyle Foster | |
*/ | |
var makeNode = function( parent, content ) { | |
var node = document.createElement( parent ); | |
if ( content ) node.innerHTML = content; | |
return node; | |
}; |
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
/** | |
* Node From String Function | |
* @author Kyle Foster | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
var nodeFromString = function( string ) { | |
var match = /^<([a-z]+)/g.exec( string ), | |
tag = match[ 1 ], | |
wrapper = 'div', | |
outliers = { |
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
/** | |
* Fancysands v0.0.1 | |
* Wrap ampersands with <span class="amp"></span> for styling | |
* @author Kyle Foster (@hkfoster) | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
( function( window ) { | |
'use strict'; |
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 wrapNodes( nodes, type ) { | |
for ( var index = 0; index < nodes.length; index++ ) { | |
var node = nodes[ index ], | |
wrapper = document.createElement( type ); | |
node.parentNode.insertBefore( wrapper, node ); | |
wrapper.appendChild( node ); | |
} | |
} |
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
/** | |
* HTML5 Form Validation 0.0.1 | |
* @author Kyle Foster (@hkfoster) | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
var formValidation = ( function() { | |
var init = function() { |
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
/** | |
* Spectral.js 0.0.6 | |
* Full-text search for the Ghost blogging platform | |
* @author Kyle Foster (@hkfoster) | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
// Lunr 0.6.0 | lunrjs.com | by Oliver Nightingale | @license MIT | |
!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.6.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].spli |
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
/** | |
* Lightbox.js 0.0.1 | |
* @author Kyle Foster (@hkfoster) | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
var lightBoxInit = ( function() { | |
var triggers = document.querySelectorAll( '[rel="modal"]' ); |
OlderNewer