Permalink
Browse files

Cleanup

  • Loading branch information...
Koen Bok
Koen Bok committed Apr 25, 2013
1 parent ab6a379 commit 872f5c2f900147d26343b4af3a47d3b765d6065d
Showing with 4,019 additions and 31 deletions.
  1. +3 −11 build/framer.js
  2. +3 −20 src/utils.coffee
  3. +4,013 −0 template/framer.js
@@ -1,7 +1,7 @@
// Framer 0.5.0-86-gc05bdd1 (c) 2013 Koen Bok
// Framer 0.5.0-95-gab6a379 (c) 2013 Koen Bok
// https://github.com/koenbok/Framer
window.FramerVersion = "0.5.0-86-gc05bdd1";
window.FramerVersion = "0.5.0-95-gab6a379";
(function(){var require = function (file, cwd) {
@@ -762,18 +762,10 @@ require.define("/src/utils.coffee",function(require,module,exports,__dirname,__f
document.onreadystatechange = function(event) {
var f, _results;
console.log("document.onreadystatechange", document.readyState);
if (document.readyState === "complete") {
console.log("__domComplete", __domComplete);
_results = [];
while (__domComplete.length) {
f = __domComplete.shift();
if (typeof f === "function") {
console.log("execute", f);
_results.push(f());
} else {
_results.push(void 0);
}
_results.push(f = __domComplete.shift()());
}
return _results;
}
@@ -320,37 +320,20 @@ exports.isMobile = ->
navigator.userAgent.toLowerCase()
# Public: Only executes a given function if the dom is loaded
#
__domComplete = []
document.onreadystatechange = (event) =>
console.log "document.onreadystatechange", document.readyState
if document.readyState is "complete"
console.log "__domComplete", __domComplete
while __domComplete.length
f = __domComplete.shift()
if typeof f is "function"
console.log "execute", f
f()
f = __domComplete.shift()()
exports.domComplete = (f) ->
if document.readyState is "complete"
f()
else
__domComplete.push f
exports.domCompleteCancel = (f) ->
__domComplete = _.without __domComplete, f
Oops, something went wrong.

0 comments on commit 872f5c2

Please sign in to comment.