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
Show hidden characters
{ | |
"predef" : [], | |
"camelcase" : 1, | |
"curly" : 1, | |
"eqeqeq" : 1, | |
"forin" : 1, | |
"freeze": 0, | |
"immed" : 1, | |
"indent": 2, | |
"latedef" : "nofunc", |
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 = function () { | |
return { | |
foo : foo, | |
foop : foo, | |
bar : bar | |
} | |
// private functions | |
function foo () { console.log('foo') } | |
function bar () { console.log('bar') } |
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
// text-hiding for hipsters, http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ | |
.hide-text{ | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
} | |
/* | |
A simple sprite mixin | |
Pass it the path to the sprite file and the left and top co-ords of the frame/icon |
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 hover = (function () { | |
var previousTarget = null; | |
return function (event) { | |
var currentTarget = event.srcElement; | |
if(currentTarget === previousTarget) return; | |
if(previousTarget) previousTarget.classList.remove('selected'); |
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 timedPromise ( t, label ) { | |
console.info( 'making promise for ' + label ); | |
return ( res,rej ) => { | |
setTimeout( () => { | |
console.log( label ); | |
res( label ) | |
}, t ); | |
} | |
} |
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 Vector2D (x, y) { | |
this.x = x || 0; | |
this.y = y || 0; | |
} | |
Vector2D.prototype = { | |
constructor: Vector2D, | |
set: function set (arg1, y) { | |
if( arg1 instanceof Vector2D ) { |
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>Transparent YT player experiment</title> | |
<meta charset="UTF-8"> | |
<style> | |
#wrapper { | |
position: relative; | |
width: 640px; |
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
OlderNewer