This file contains hidden or 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
// caching script fetcher // | |
var futrs = {}; | |
var ajaxFetch = function( url, cBak ) { | |
if ( !futrs[ url ] ) { | |
futrs[ url ] = $.Deferred(function( defer ) { | |
$.getScript( url ) | |
.then( defer.resolve, defer.reject ); |
This file contains hidden or 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
// programatic entry point for the server // | |
var router = require('./router.js'), | |
requestHandlers = require('./requestHandlers.js'), | |
webServer = require('./server.js'), | |
handle = {}; | |
// Unary referencing... each function maps -to- a specific request/params/method etc... // | |
handle['/'] = handle['/home'] = handle['/Home'] = handle['/index.html'] = handle['/Index.html'] = requestHandlers.startRoot; |
This file contains hidden or 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
<!Doctype html> | |
<meta name="viewport" content="width=620" /> | |
<title>KnD-MApPA</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<article> | |
<p>Finding You...: <span id="status">Checking...</span> | |
</p> | |
</article> | |
<script> | |
var map = "", |
This file contains hidden or 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 a blob | |
var blob = new Blob(['blobyJo'], { | |
type: 'text/plain' | |
}); | |
try { | |
var store = db.transaction(['buckets'], 'readwrite') | |
.objectStore('buckets'); | |
var fngr = store.put(blob, 'blob'); |
This file contains hidden or 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 (context) { | |
var createKontxt = function (nameStr, baseLine) { | |
var x, j, r, baseKnTxt, name; | |
var wdgts = nameStr.split('.'); | |
j = baseKnTxt = baseLine ? baseLine : (Function('return this')()); | |
This file contains hidden or 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 events = (function(){ | |
var topics = {}; | |
return { | |
subscribe: function(topic, listener) { | |
if(!topics[topic]) topics[topic] = { | |
queue: [] | |
}; |
This file contains hidden or 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
// Require our emitter | |
var Emitter = require('events').EventEmitter; | |
// Our main constructor | |
var myEmitter = function (config) { | |
// extend with emitter | |
Emitter.call(this); | |
}; |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>Dialog Test</title> | |
<style> | |
dialog::backdrop { | |
background: rgba(255, 0, 255, 0.25); | |
} | |
</style> | |
</head> |
This file contains hidden or 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
/* | |
The debounce method returns a function which wraps your callback, | |
limiting its execution rate to the limit specified in the second argument. | |
Now your frequent callbacks can't brick the user's browser! | |
*/ | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; |
This file contains hidden or 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
// session storage caching | |
define(function() { | |
var cacheObj = window.sessionStorage || { | |
getItem: function(key) { | |
return this[key]; | |
}, | |
setItem: function(key, value) { |