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 (name, definition, global) { | |
if (typeof define === 'function') { | |
define(definition); | |
} else if (typeof module !== 'undefined' && module.exports) { | |
module.exports = definition(); | |
} else { | |
global[name] = definition(); | |
} | |
})('detectIDB', 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
var _reflect = function reflect (it, recursive, level) { | |
level = ~~level; | |
var indent = (' >').repeat(level), | |
isObject = function (candidate) { return Object.prototype.toString.call(candidate) == '[object Object]'}; | |
if (level > 1) { | |
console.log(indent + ' recursion too deep, stopping.'); | |
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
//configure closure compiler | |
var closureFiles = handlerClassNames.map(function (name) { | |
return 'src/' + name + '.js'; | |
}); | |
closureFiles.unshift('src/InputController.js'); | |
closureFiles.push('build/bundle.js'); | |
/* ... */ | |
grunt.config.set('closure-compiler.bundle', { | |
closurePath: 'lib/closure', | |
jsOutputFile: 'build/input-controller.js', |
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
<div class="g-comments" | |
data-href="{put-your-url-here}" | |
data-width="{put-your-container-width-here}" | |
data-first_party_property="BLOGGER" | |
data-view_type="FILTERED_POSTMOD" | |
></div> | |
<script type="text/javascript"> | |
(function() { | |
var gp = document.createElement('script'); gp.type = 'text/javascript'; gp.async = 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
<script> | |
var dojoConfig = { | |
packages: [ | |
{ | |
name: 'storehouse', | |
location: '../storehouse' | |
} | |
] | |
}; | |
</script> |
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 SPEECH = 'speech'; | |
var bindings = { | |
/* ... */ | |
fullSpeed: { | |
device: SPEECH, | |
inputId: 'full speed' | |
}, | |
stop: { |
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
/** | |
* Takes an array of data objects to store and calls IDBWrapper's batch() method | |
* | |
* @param {Array} dataArray An array of objects to be stored | |
* @param {Function} [onSuccess] Gets called if the operation was successful | |
* @param {onError} [onError] Gets called if an error occurred | |
*/ | |
function putMany (dataArray, onSuccess, onError) { | |
var preparedData = dataArray.map(function(dataObject){ |
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 onItem = function (item) { | |
console.log('got item:', item); | |
}; | |
var onEnd = function (item) { | |
console.log('All done.'); | |
}; | |
customers.iterate(onItem, { | |
order: 'DESC', | |
onEnd: onEnd |
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
customers.iterate(onItem, { | |
index: 'lastname', | |
keyRange: myKeyRange, | |
order: 'ASC', | |
filterDuplicates: false, | |
writeAccess: false, | |
onEnd: onEndCallback, | |
onError: onErrorCallback | |
}); |
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
container.addEventListener('click', function (evt) { | |
// The user has clicked; let's note this event | |
// and the click's coordinates so that we can | |
// react to it in the render loop | |
clickInfo.userHasClicked = true; | |
clickInfo.x = evt.clientX; | |
clickInfo.y = evt.clientY; | |
}, false); |
NewerOlder