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
| $.fn.colorToday = function(property){ | |
| var now = new Date(), | |
| color = '#', | |
| day = now.getDate(), | |
| month = now.getMonth() + 1, | |
| year = now.getFullYear().toString().slice(2); | |
| day < 10 && (day = '0' + day); | |
| month < 10 && (month = '0' + month); | |
| color += day.toString() + month.toString() + year; |
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(){ | |
| //*********************************************** | |
| // | |
| // A Sorta Kinda Map object | |
| // | |
| //*********************************************** | |
| function fastEach(array, callback) { | |
| for (var i = 0; i < array.length; i++) { |
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
| html:after{ | |
| content:''; | |
| position:fixed; | |
| top:0; | |
| bottom:0; | |
| left:0; | |
| right:0; | |
| background: black; | |
| opacity:0.8; | |
| pointer-events:none; |
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 requestCallbacks = [], | |
| ready = true; | |
| function getPosition(callback){ | |
| requestCallbacks.push(callback); | |
| if(ready){ | |
| ready = false; | |
| navigator.geolocation.getCurrentPosition(function(position){ | |
| while(requestCallbacks.length){ | |
| requestCallbacks.pop()(position); |
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
| .checkbox{ | |
| border-radius:2px; | |
| border:1px solid rgba(0,0,0,0.3); | |
| display:inline-block; | |
| width:40px; | |
| height:20px; | |
| background:rgba(50,50,50,0.7); | |
| box-shadow:inset 0 2px 5px rgba(0,0,0,0.3); | |
| } |
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 closest(target, selector){ | |
| while(target && target.parentNode && Array.prototype.slice.apply(target.parentNode.querySelectorAll(selector)).indexOf(target)<0){ | |
| target = target.parentNode; | |
| } | |
| return target === document ? null : target; | |
| } |
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 fastEach(items, callback) { | |
| for (var i = 0; i < items.length && !callback(items[i], i, items);i++) {} | |
| return items; | |
| } | |
| module.exports = fastEach; |
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
| // Module A does events | |
| module.exports = function DoEventStuff(){ | |
| /* | |
| Do DOM event things like A.on('event') | |
| Stores info about bindings in an array. | |
| */ |
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 countObjChildren(thing){ | |
| var visited = []; | |
| function count(thing){ | |
| for(var key in thing){ | |
| var prop = thing[key]; | |
| if(prop != null && typeof thing[key] === 'object'){ | |
| if(visited.indexOf(prop)<0){ | |
| visited.push(prop); | |
| count(prop); |
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 checkSSL(){ | |
| return 'lol probably'; | |
| } |
OlderNewer