diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 8073cd317..0378f4f4e 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -5904,7 +5904,7 @@ } }, dialog: function() { - var dialog, elm, mimeTypes, name, nodes, thread, _i, _j, _len, _len1, _ref, _ref1; + var dialog, elm, i, items, mimeTypes, name, nodes, thread; dialog = UI.dialog('qr', 'top:0;right:0;', "
"); QR.nodes = nodes = { @@ -5965,9 +5965,9 @@ })); } $.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput); - _ref = $$('*', QR.nodes.el); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elm = _ref[_i]; + items = $$('*', QR.nodes.el); + i = 0; + while (elm = items[i++]) { $.on(elm, 'blur', QR.focusout); $.on(elm, 'focus', QR.focusin); } @@ -5992,9 +5992,9 @@ return QR.selected.nodes.spoiler.click(); }); $.on(nodes.fileInput, 'change', QR.fileInput); - _ref1 = ['name', 'email', 'sub', 'com']; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - name = _ref1[_j]; + items = ['name', 'email', 'sub', 'com']; + i = 0; + while (name = items[i++]) { $.on(nodes[name], 'input', function() { return QR.selected.save(this); }); diff --git a/builds/crx/script.js b/builds/crx/script.js index 68f8eea56..03cb0407c 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5902,7 +5902,7 @@ } }, dialog: function() { - var dialog, mimeTypes, name, nodes, thread, _i, _len, _ref; + var dialog, i, items, mimeTypes, name, nodes, thread; dialog = UI.dialog('qr', 'top:0;right:0;', " "); QR.nodes = nodes = { @@ -5984,9 +5984,9 @@ return QR.selected.nodes.spoiler.click(); }); $.on(nodes.fileInput, 'change', QR.fileInput); - _ref = ['name', 'email', 'sub', 'com']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; + items = ['name', 'email', 'sub', 'com']; + i = 0; + while (name = items[i++]) { $.on(nodes[name], 'input', function() { return QR.selected.save(this); }); diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index d0ccd85e2..332ab2fe8 100644 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -930,7 +930,9 @@ QR = <% if (type === 'userscript') { %> # XXX Firefox lacks focusin/focusout support. - for elm in $$ '*', QR.nodes.el + items = $$ '*', QR.nodes.el + i = 0 + while elm = items[i++] $.on elm, 'blur', QR.focusout $.on elm, 'focus', QR.focusin <% } %> @@ -946,7 +948,9 @@ QR = $.on nodes.spoiler, 'change', -> QR.selected.nodes.spoiler.click() $.on nodes.fileInput, 'change', QR.fileInput # save selected post's data - for name in ['name', 'email', 'sub', 'com'] + items = ['name', 'email', 'sub', 'com'] + i = 0 + while name = items[i++] $.on nodes[name], 'input', -> QR.selected.save @ $.on nodes.thread, 'change', -> QR.selected.save @