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
// Minimalist class (className) manipulation library | |
var klass = { | |
has: function(elem, name) { | |
return (' '+elem.className+' ').indexOf(' '+name+' ') != -1; | |
}, | |
add: function(elem, name) { | |
if(!klass.has(elem, name)) { | |
elem.className += ' '+name; | |
} | |
}, |
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
#context-sendpage, #context-sendlink, #context-sendimage, #context-setDesktopBackground, | |
#context-bookmarklink, #context-savelink, #context-searchselect, | |
#context-bookmarkpage, #context-savepage, #context-sep-open, #context-sep-viewbgimage, | |
#urlbar .urlbar-history-dropmarker, #star-button | |
{ | |
display: none !important; | |
} | |
#urlbar-icons { | |
margin-right: 2px; |
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 assets = [ | |
'http://localhost/offline-assets/fancybox/jquery.fancybox-1.3.4.js', | |
'http://localhost/offline-assets/fancybox/jquery.fancybox-1.3.4.css' | |
]; | |
for (var i=0,l=assets.length; i<l; i++) { | |
loadAsset(assets[i]); | |
} | |
function loadAsset(url){ |
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 find(root, obj) { | |
var seen = []; | |
function search(root, name, depth) { | |
if (root === obj) { | |
console.log(name); | |
return; | |
} | |
if (!depth) { return; } | |
if (seen.indexOf(root) >= 0) { return; } | |
if (typeof root !== "object") { 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>H264</title> | |
<script src="h264.js"></script> | |
</head> | |
<body> |
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 markdownService =(function(){ | |
var cache = function(fn){ | |
var c = {}; | |
return function(file, cb) { | |
var item = c[file], | |
_cb = cb, | |
cb = function(r) { | |
var cFile = c[file]; |
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
/* assumes .details is position: relative */ | |
.details::after { | |
content: ''; | |
position: absolute; | |
border-top: 3px solid #7f7f7f; | |
border-right: 3px solid #7f7f7f; | |
height: 6px; | |
width: 6px; | |
top: 50%; | |
right: 12px; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>ColorSpin</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,user-scalable=no"/> | |
<style> | |
html { height: 100%; } | |
body { | |
height: 100%; | |
margin: 0; |
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
// A simple module to replace `Backbone.sync` with *localStorage*-based | |
// persistence. Models are given GUIDS, and saved into a JSON object. Simple | |
// as that. | |
// Generate four random hex digits. | |
function S4() { | |
return (((1+Math.random())*0x10000)|0).toString(16).substring(1); | |
}; | |
// Generate a pseudo-GUID by concatenating random hexadecimal. |
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
HAI | |
CAN HAS STDIO? | |
I HAS A VAR | |
IM IN YR LOOP | |
UP VAR!!1 | |
VISIBLE VAR | |
IZ VAR BIGGER THAN 10? KTHXBYE | |
IM OUTTA YR LOOP | |
KTHXBYE |
OlderNewer