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 obj_normalize = (function() { | |
function runNormalizer(currentValue, normalizer) { | |
if (typeof normalizer === 'function') | |
return normalizer(currentValue); | |
// other types of normalization, like Regexp-Replace | |
return currentValue.replace(normalizer[0], normalizer[1]); |
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
RegExp.fromString = function(str, flags) { | |
return new RegExp(str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), flags); | |
}; |
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
/** | |
* Change file modification time to the date from EXIF | |
* | |
* System Requirements: | |
* | |
* > npm install -g includejs | |
* > npm install -g exif | |
* | |
* Usage: | |
* |
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 view = ko.views.manager.currentView, | |
scimoz = view.scimoz, | |
selection = scimoz.selText, | |
result = null, | |
log = function() { | |
var message = ''; | |
for (var i = 0; i < arguments.length; i++) { | |
message += arguments[i] + ' '; | |
} |
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
window.dragger = (function() { | |
var requestAnimationFrame = (function() { | |
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || | |
function(callback) { | |
return setTimeout(callback, 17); | |
} | |
})(); |
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 view = ko.views.manager.currentView, | |
scimoz = view.scimoz, | |
selection = scimoz.selText || scimoz.text, | |
service = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService), | |
log = function() { | |
var message = ''; | |
for (var i = 0; i < arguments.length; i++) { | |
message += arguments[i] + ' '; | |
} | |
NewerOlder