diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index abdd13b350..c2fe2a35f7 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -157,7 +157,7 @@ Filter = node: -> return if @isClone - {hide, stub, hl, top, noti} = Filter.test @, (!@isFetchedQuote and (@isReply or g.VIEW is 'index')) + {hide, stub, hl, noti} = Filter.test @, (!@isFetchedQuote and (@isReply or g.VIEW is 'index')) if hide if @isReply PostHiding.hide @, stub diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 962355ad1c..d3aa86f46f 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -323,7 +323,7 @@ Settings = '%board' else c - for key, val of Config.hotkeys when key of data.Conf + for key of Config.hotkeys when key of data.Conf data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, (s) -> "#{s[0].toUpperCase()}#{s[1..]}").replace /(^|.+\+)[A-Z]$/g, (s) -> "Shift+#{s[0...-1]}#{s[-1..].toLowerCase()}" if data.WatchedThreads diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 929f85278c..d1dcbe0934 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -81,8 +81,6 @@ class Menu setPosition: => mRect = @menu.getBoundingClientRect() bRect = lastToggledButton.getBoundingClientRect() - bTop = window.scrollY + bRect.top - bLeft = window.scrollX + bRect.left cHeight = doc.clientHeight cWidth = doc.clientWidth [top, bottom] = if bRect.top + bRect.height + mRect.height < cHeight diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index b6fc25c193..dc8d0784cb 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -103,7 +103,7 @@ Embedding = style.pointerEvents = 'none' title: (data) -> - {key, uid, options, link, post} = data + {key, uid, link} = data return if not (service = Embedding.types[key].title) $.addClass link, key.toLowerCase() if service.batchSize @@ -179,7 +179,7 @@ Embedding = title: (req, data) -> return unless req.status - {key, uid, options, link, post} = data + {key, uid, link, post} = data {status} = req service = Embedding.types[key].title diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 69f03d7662..2a23bf1ae8 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -155,6 +155,7 @@ ThreadUpdater = ThreadUpdater.error @ else ThreadUpdater.error @ + return kill: -> ThreadUpdater.thread.kill() diff --git a/src/Posting/Captcha.fixes.coffee b/src/Posting/Captcha.fixes.coffee index e5640e9be6..a3ea4289a2 100644 --- a/src/Posting/Captcha.fixes.coffee +++ b/src/Posting/Captcha.fixes.coffee @@ -106,7 +106,6 @@ Captcha.fixes = @addTooltips16 @images addLabels: -> - imageSelect = $ '.fbc-payload-imageselect' labels = for checkbox, i in @images checkbox.id = "checkbox-#{i}" label = $.el 'label', diff --git a/src/classes/DataBoard.coffee b/src/classes/DataBoard.coffee index 3f245b369c..fed3202788 100644 --- a/src/classes/DataBoard.coffee +++ b/src/classes/DataBoard.coffee @@ -121,7 +121,7 @@ class DataBoard clean: -> siteID = g.SITE.ID - for boardID, val of @data[siteID].boards + for boardID of @data[siteID].boards @deleteIfEmpty {siteID, boardID} now = Date.now() unless now - 2 * $.HOUR < (@data[siteID].lastChecked or 0) <= now diff --git a/src/platform/CrossOrigin.coffee b/src/platform/CrossOrigin.coffee index bc54477f9b..e5e455705c 100644 --- a/src/platform/CrossOrigin.coffee +++ b/src/platform/CrossOrigin.coffee @@ -143,11 +143,11 @@ CrossOrigin.ajax = (url, options={}) -> timeout onload: (xhr) -> try - response = switch responseType + switch responseType when 'json' - if xhr.responseText then JSON.parse(xhr.responseText) else null + response = if xhr.responseText then JSON.parse(xhr.responseText) else null else - xhr.responseText + response = xhr.responseText $.extend req, { response status: xhr.status