diff --git a/LICENSE b/LICENSE index 63b08e1b2..6c50e8b36 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.3.2 - 2014-01-19 +* 4chan X - Version 1.3.2 - 2014-01-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 117f1b822..77eb99cb1 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.3.2 - 2014-01-19 +* 4chan X - Version 1.3.2 - 2014-01-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -7506,9 +7506,9 @@ return ImageExpand.toggle(Get.postFromNode(this)); }, toggleAll: function() { - var func; + var func, toggle; $.event('CloseMenu'); - func = function(post) { + toggle = function(post) { var file; file = post.file; if (!(file && file.isImage && doc.contains(post.nodes.root))) { @@ -7530,11 +7530,11 @@ } return g.posts.forEach(function(post) { var _i, _len, _ref; - func(post); + toggle(post); _ref = post.clones; for (_i = 0, _len = _ref.length; _i < _len; _i++) { post = _ref[_i]; - func(post); + toggle(post); } }); }, diff --git a/builds/crx/script.js b/builds/crx/script.js index d019b6295..66f1a0152 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.3.2 - 2014-01-19 +* 4chan X - Version 1.3.2 - 2014-01-21 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -7489,9 +7489,9 @@ return ImageExpand.toggle(Get.postFromNode(this)); }, toggleAll: function() { - var func; + var func, toggle; $.event('CloseMenu'); - func = function(post) { + toggle = function(post) { var file; file = post.file; if (!(file && file.isImage && doc.contains(post.nodes.root))) { @@ -7513,11 +7513,11 @@ } return g.posts.forEach(function(post) { var _i, _len, _ref; - func(post); + toggle(post); _ref = post.clones; for (_i = 0, _len = _ref.length; _i < _len; _i++) { post = _ref[_i]; - func(post); + toggle(post); } }); }, diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index b4e1f1ed5..71916d684 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -30,9 +30,10 @@ ImageExpand = return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0 e.preventDefault() ImageExpand.toggle Get.postFromNode @ + toggleAll: -> $.event 'CloseMenu' - func = (post) -> + toggle = (post) -> {file} = post return unless file and file.isImage and doc.contains post.nodes.root if ImageExpand.on and @@ -40,6 +41,7 @@ ImageExpand = Conf['Expand from here'] and Header.getTopOf(file.thumb) < 0) return $.queueTask func, post + if ImageExpand.on = $.hasClass ImageExpand.EAI, 'expand-all-shortcut' ImageExpand.EAI.className = 'contract-all-shortcut fa fa-compress' ImageExpand.EAI.title = 'Contract All Images' @@ -48,10 +50,12 @@ ImageExpand = ImageExpand.EAI.className = 'expand-all-shortcut fa fa-expand' ImageExpand.EAI.title = 'Expand All Images' func = ImageExpand.contract + g.posts.forEach (post) -> - func post - func post for post in post.clones + toggle post + toggle post for post in post.clones return + setFitness: -> (if @checked then $.addClass else $.rmClass) doc, @name.toLowerCase().replace /\s+/g, '-'