From dca84b6d2d10954114b48ed6bd496f8b0606a823 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 15 Feb 2015 01:21:57 -0800 Subject: [PATCH] More unused argument cleanup. --- src/General/lib/$.coffee | 2 +- src/Miscellaneous/ExpandThread.coffee | 7 +++++-- src/Miscellaneous/RemoveSpoilers.coffee | 2 +- src/Monitoring/ThreadStats.coffee | 2 +- src/Posting/QR.post.coffee | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index 5250c132e..111b80959 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -318,7 +318,7 @@ chrome.storage.onChanged.addListener (changes, area) -> return $.sync = (key, cb) -> $.syncing[key] = cb -$.forceSync = (key) -> return +$.forceSync = -> return $.get = (key, val, cb) -> if typeof cb is 'function' diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index c0d0a3206..d41585c32 100755 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -44,13 +44,15 @@ ExpandThread = if thread.ID of ExpandThread.statuses ExpandThread.contract thread, a, threadRoot else - ExpandThread.expand thread, a, threadRoot - expand: (thread, a, threadRoot) -> + ExpandThread.expand thread, a + + expand: (thread, a) -> ExpandThread.statuses[thread] = status = {} a.textContent = ExpandThread.text '...', a.textContent.match(/\d+/g)... status.req = $.cache "//a.4cdn.org/#{thread.board}/thread/#{thread}.json", -> delete status.req ExpandThread.parse @, thread, a + contract: (thread, a, threadRoot) -> status = ExpandThread.statuses[thread] delete ExpandThread.statuses[thread] @@ -78,6 +80,7 @@ ExpandThread = filesCount++ if 'file' of Get.postFromRoot reply $.rm reply a.textContent = ExpandThread.text '+', postsCount, filesCount + parse: (req, thread, a) -> if req.status not in [200, 304] a.textContent = "Error #{req.statusText} (#{req.status})" diff --git a/src/Miscellaneous/RemoveSpoilers.coffee b/src/Miscellaneous/RemoveSpoilers.coffee index 8295e9960..6bb7df137 100755 --- a/src/Miscellaneous/RemoveSpoilers.coffee +++ b/src/Miscellaneous/RemoveSpoilers.coffee @@ -16,7 +16,7 @@ RemoveSpoilers = if g.VIEW is 'archive' $.ready -> RemoveSpoilers.unspoiler $.id 'arc-list' - node: (post) -> + node: -> RemoveSpoilers.unspoiler @nodes.comment unspoiler: (el) -> diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index 9b821626c..3b56bd949 100755 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -23,7 +23,7 @@ ThreadStats = @dialog = sc = UI.dialog 'thread-stats', 'bottom: 0px; right: 0px;', <%= html('
&{statsHTML}
') %> $.addClass doc, 'float' - $.ready => + $.ready -> $.add d.body, sc @postCountEl = $ '#post-count', sc diff --git a/src/Posting/QR.post.coffee b/src/Posting/QR.post.coffee index 919c6dad7..9d9aa1b6b 100644 --- a/src/Posting/QR.post.coffee +++ b/src/Posting/QR.post.coffee @@ -15,7 +15,7 @@ QR.post = class $.on el, 'click', @select $.on @nodes.rm, 'click', (e) => e.stopPropagation(); @rm() - $.on @nodes.label, 'click', (e) => e.stopPropagation() + $.on @nodes.label, 'click', (e) -> e.stopPropagation() $.on @nodes.spoiler, 'change', (e) => @spoiler = e.target.checked QR.nodes.spoiler.checked = @spoiler if @ is QR.selected