diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 474f012dd..0164e2070 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -974,7 +974,7 @@ } Post.prototype.parseComment = function() { - var bq, data, i, node, nodes, text, _i, _j, _len, _ref, _ref1; + var bq, data, i, node, nodes, text, _i, _len, _ref; bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); @@ -984,8 +984,9 @@ } text = []; nodes = d.evaluate('.//br|.//text()', bq, null, 7, null); - for (i = _j = 0, _ref1 = nodes.snapshotLength; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) { - text.push((data = nodes.snapshotItem(i).data) ? data : '\n'); + i = 0; + while (i < nodes.snapshotLength) { + text.push((data = nodes.snapshotItem(i++).data) ? data : '\n'); } return this.info.comment = text.join('').trim().replace(/\s+$/gm, ''); }; @@ -10041,14 +10042,15 @@ return Main.checkUpdate(); }, callbackNodes: function(klass, nodes) { - var callback, err, errors, i, len, node, _i, _j, _len, _ref; + var callback, err, errors, i, len, node, _i, _len, _ref; len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; - for (i = _j = 0; 0 <= len ? _j < len : _j > len; i = 0 <= len ? ++_j : --_j) { - node = nodes[i]; + i = 0; + while (i < len) { + node = nodes[i++]; try { callback.cb.call(node); } catch (_error) { @@ -10167,8 +10169,11 @@ lastupdate: 0, lastchecked: 0 }; - return $.get(items, function(items) { - if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) { + return $.get(items, function(_arg) { + var lastchecked, lastupdate; + + lastupdate = _arg.lastupdate, lastchecked = _arg.lastchecked; + if ((lastupdate > now - freq) || (lastchecked > now - $.DAY)) { return; } return $.ready(function() { diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index e907a735a..356e65b65 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -970,7 +970,7 @@ } Post.prototype.parseComment = function() { - var bq, data, i, node, nodes, text, _i, _j, _len, _ref, _ref1; + var bq, data, i, node, nodes, text, _i, _len, _ref; bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); @@ -980,8 +980,9 @@ } text = []; nodes = d.evaluate('.//br|.//text()', bq, null, 7, null); - for (i = _j = 0, _ref1 = nodes.snapshotLength; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) { - text.push((data = nodes.snapshotItem(i).data) ? data : '\n'); + i = 0; + while (i < nodes.snapshotLength) { + text.push((data = nodes.snapshotItem(i++).data) ? data : '\n'); } return this.info.comment = text.join('').trim().replace(/\s+$/gm, ''); }; @@ -10064,14 +10065,15 @@ return Main.checkUpdate(); }, callbackNodes: function(klass, nodes) { - var callback, err, errors, i, len, node, _i, _j, _len, _ref; + var callback, err, errors, i, len, node, _i, _len, _ref; len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; - for (i = _j = 0; 0 <= len ? _j < len : _j > len; i = 0 <= len ? ++_j : --_j) { - node = nodes[i]; + i = 0; + while (i < len) { + node = nodes[i++]; try { callback.cb.call(node); } catch (_error) { @@ -10190,8 +10192,11 @@ lastupdate: 0, lastchecked: 0 }; - return $.get(items, function(items) { - if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) { + return $.get(items, function(_arg) { + var lastchecked, lastupdate; + + lastupdate = _arg.lastupdate, lastchecked = _arg.lastchecked; + if ((lastupdate > now - freq) || (lastchecked > now - $.DAY)) { return; } return $.ready(function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index db5fdedec..b7138bda2 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -973,7 +973,7 @@ } Post.prototype.parseComment = function() { - var bq, data, i, node, nodes, text, _i, _j, _len, _ref, _ref1; + var bq, data, i, node, nodes, text, _i, _len, _ref; bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); @@ -983,8 +983,9 @@ } text = []; nodes = d.evaluate('.//br|.//text()', bq, null, 7, null); - for (i = _j = 0, _ref1 = nodes.snapshotLength; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) { - text.push((data = nodes.snapshotItem(i).data) ? data : '\n'); + i = 0; + while (i < nodes.snapshotLength) { + text.push((data = nodes.snapshotItem(i++).data) ? data : '\n'); } return this.info.comment = text.join('').trim().replace(/\s+$/gm, ''); }; @@ -10046,14 +10047,15 @@ return Main.checkUpdate(); }, callbackNodes: function(klass, nodes) { - var callback, err, errors, i, len, node, _i, _j, _len, _ref; + var callback, err, errors, i, len, node, _i, _len, _ref; len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; - for (i = _j = 0; 0 <= len ? _j < len : _j > len; i = 0 <= len ? ++_j : --_j) { - node = nodes[i]; + i = 0; + while (i < len) { + node = nodes[i++]; try { callback.cb.call(node); } catch (_error) { @@ -10172,8 +10174,11 @@ lastupdate: 0, lastchecked: 0 }; - return $.get(items, function(items) { - if (items.lastupdate > now - freq || items.lastchecked > now - $.DAY) { + return $.get(items, function(_arg) { + var lastchecked, lastupdate; + + lastupdate = _arg.lastupdate, lastchecked = _arg.lastchecked; + if ((lastupdate > now - freq) || (lastchecked > now - $.DAY)) { return; } return $.ready(function() { diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 6d364be0b..975c8e115 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -221,8 +221,9 @@ Main = len = nodes.length for callback in klass::callbacks # c.profile callback.name - for i in [0...len] - node = nodes[i] + i = 0 + while i < len + node = nodes[i++] try callback.cb.call node catch err @@ -305,8 +306,8 @@ Main = items = lastupdate: 0 lastchecked: 0 - $.get items, (items) -> - if items.lastupdate > now - freq or items.lastchecked > now - $.DAY + $.get items, ({lastupdate, lastchecked}) -> + if (lastupdate > now - freq) or (lastchecked > now - $.DAY) return $.ready -> $.on window, 'message', Main.message diff --git a/src/General/lib/post.class b/src/General/lib/post.class index 0d9f356f2..ad15b902f 100644 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -108,8 +108,9 @@ class Post text = [] # XPathResult.ORDERED_NODE_SNAPSHOT_TYPE === 7 nodes = d.evaluate './/br|.//text()', bq, null, 7, null - for i in [0...nodes.snapshotLength] - text.push if data = nodes.snapshotItem(i).data then data else '\n' + i = 0 + while i < nodes.snapshotLength + text.push if data = nodes.snapshotItem(i++).data then data else '\n' @info.comment = text.join('').trim().replace /\s+$/gm, '' parseQuotes: ->