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 print = console.log; | |
var header = function(name){print("\n>>"+ name.toUpperCase() +"<<")} | |
var subheader = function(name){print(" >"+ name +"< ")} | |
header("iterating arrays"); | |
subheader("emulated let"); | |
(function() { | |
var callbacks = []; |
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
class Sprite | |
@id: 0 | |
id: -1 | |
x: 0 | |
y: 0 | |
width: 0 | |
height: 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
class Frame | |
constructor: (@elements) -> | |
methods = ['remove', 'show', 'hide', 'stop'] | |
for method in methods | |
do (method) -> | |
Frame::[method] = -> | |
element[method]() for element in @elements |
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 initializeRinger(){ | |
var pressedAt = 0; | |
document.removeEventListener('DOMContentLoaded', initializeRinger); | |
function checkRing(target){ | |
if (!target.classList.contains('ringer')) return; | |
if (target.classList.contains('ringer-no-ring')) return; | |
target.classList.add('ringer-no-ring'); | |
} | |
function onpress(event){ |
OlderNewer