From e1b0d62ceb258f016377517182497d3572fae095 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 12 Jun 2016 00:25:58 -0700 Subject: [PATCH] Have return hack be added by the compilation script. --- src/Archive/Redirect.coffee | 2 -- src/Filtering/Anonymize.coffee | 2 -- src/Filtering/Filter.coffee | 2 -- src/Filtering/PostHiding.coffee | 2 -- src/Filtering/Recursive.coffee | 2 -- src/Filtering/ThreadHiding.coffee | 2 -- src/General/Build.coffee | 2 -- src/General/Get.coffee | 2 -- src/General/Header.coffee | 2 -- src/General/Index.coffee | 2 -- src/General/Polyfill.coffee | 2 -- src/General/Settings.coffee | 2 -- src/General/UI.coffee | 2 -- src/Images/FappeTyme.coffee | 2 -- src/Images/Gallery.coffee | 2 -- src/Images/ImageCommon.coffee | 2 -- src/Images/ImageExpand.coffee | 2 -- src/Images/ImageHover.coffee | 2 -- src/Images/ImageLoader.coffee | 2 -- src/Images/Metadata.coffee | 2 -- src/Images/RevealSpoilers.coffee | 2 -- src/Images/Sauce.coffee | 2 -- src/Images/Volume.coffee | 2 -- src/Linkification/Embedding.coffee | 2 -- src/Linkification/Linkify.coffee | 2 -- src/Menu/ArchiveLink.coffee | 2 -- src/Menu/DeleteLink.coffee | 2 -- src/Menu/DownloadLink.coffee | 2 -- src/Menu/Menu.coffee | 2 -- src/Menu/ReportLink.coffee | 2 -- src/Miscellaneous/AntiAutoplay.coffee | 2 -- src/Miscellaneous/Banner.coffee | 2 -- src/Miscellaneous/CatalogLinks.coffee | 2 -- src/Miscellaneous/CustomCSS.coffee | 2 -- src/Miscellaneous/ExpandComment.coffee | 2 -- src/Miscellaneous/ExpandThread.coffee | 2 -- src/Miscellaneous/FileInfo.coffee | 2 -- src/Miscellaneous/Flash.coffee | 2 -- src/Miscellaneous/Fourchan.coffee | 2 -- src/Miscellaneous/IDColor.coffee | 2 -- src/Miscellaneous/IDHighlight.coffee | 2 -- src/Miscellaneous/Keybinds.coffee | 2 -- src/Miscellaneous/Nav.coffee | 2 -- src/Miscellaneous/NormalizeURL.coffee | 2 -- src/Miscellaneous/PSAHiding.coffee | 2 -- src/Miscellaneous/RelativeDates.coffee | 2 -- src/Miscellaneous/RemoveSpoilers.coffee | 2 -- src/Miscellaneous/Report.coffee | 2 -- src/Miscellaneous/ThreadLinks.coffee | 2 -- src/Miscellaneous/Time.coffee | 2 -- src/Monitoring/Favicon.coffee | 2 -- src/Monitoring/MarkNewIPs.coffee | 2 -- src/Monitoring/ReplyPruning.coffee | 2 -- src/Monitoring/ThreadExcerpt.coffee | 2 -- src/Monitoring/ThreadStats.coffee | 2 -- src/Monitoring/ThreadUpdater.coffee | 2 -- src/Monitoring/ThreadWatcher.coffee | 2 -- src/Monitoring/Unread.coffee | 2 -- src/Posting/PassLink.coffee | 2 -- src/Posting/PostSuccessful.coffee | 2 -- src/Posting/QR.coffee | 2 -- src/Quotelinks/QuoteBacklink.coffee | 2 -- src/Quotelinks/QuoteCT.coffee | 2 -- src/Quotelinks/QuoteInline.coffee | 2 -- src/Quotelinks/QuoteOP.coffee | 2 -- src/Quotelinks/QuotePreview.coffee | 2 -- src/Quotelinks/QuoteStrikeThrough.coffee | 2 -- src/Quotelinks/QuoteThreading.coffee | 2 -- src/Quotelinks/QuoteYou.coffee | 2 -- src/Quotelinks/Quotify.coffee | 2 -- src/classes/Board.coffee | 2 -- src/classes/Callbacks.coffee | 2 -- src/classes/CatalogThread.coffee | 2 -- src/classes/Connection.coffee | 2 -- src/classes/DataBoard.coffee | 2 -- src/classes/Fetcher.coffee | 2 -- src/classes/Notice.coffee | 2 -- src/classes/Post.coffee | 2 -- src/classes/RandomAccessList.coffee | 2 -- src/classes/ShimSet.coffee | 2 -- src/classes/SimpleDict.coffee | 2 -- src/classes/Thread.coffee | 2 -- src/config/Config.coffee | 2 -- src/main/Main.coffee | 2 -- src/platform/$$.coffee | 2 -- src/platform/$.coffee | 2 -- src/platform/CrossOrigin.coffee | 2 -- tools/chain.js | 6 +++++- 88 files changed, 5 insertions(+), 175 deletions(-) diff --git a/src/Archive/Redirect.coffee b/src/Archive/Redirect.coffee index ee54e8074e..432e48e049 100644 --- a/src/Archive/Redirect.coffee +++ b/src/Archive/Redirect.coffee @@ -173,5 +173,3 @@ Redirect = location.replace url else if alternative location.replace alternative - -return Redirect diff --git a/src/Filtering/Anonymize.coffee b/src/Filtering/Anonymize.coffee index 8dddc728e9..4f0b524ac4 100644 --- a/src/Filtering/Anonymize.coffee +++ b/src/Filtering/Anonymize.coffee @@ -24,5 +24,3 @@ Anonymize = name.textContent = 'Anonymous' for name in $$ '.name' $.rm trip for trip in $$ '.postertrip' return - -return Anonymize diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index 0792437457..96b387a08a 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -249,5 +249,3 @@ Filter = tl = ta.textLength ta.setSelectionRange tl, tl ta.focus() - -return Filter diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index cd37410c0e..3b64fa6617 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -215,5 +215,3 @@ PostHiding = for quotelink in Get.allQuotelinksLinkingTo post $.rmClass quotelink, 'filtered' return - -return PostHiding diff --git a/src/Filtering/Recursive.coffee b/src/Filtering/Recursive.coffee index 1c6f44139b..902fce8b7f 100644 --- a/src/Filtering/Recursive.coffee +++ b/src/Filtering/Recursive.coffee @@ -32,5 +32,3 @@ Recursive = g.posts.forEach (post) -> if fullID in post.quotes recursive post, args... - -return Recursive diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index 3f83bd5e62..7087deb120 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -189,5 +189,3 @@ ThreadHiding = threadRoot = thread.OP.nodes.root.parentNode threadRoot.hidden = thread.isHidden = false Index.updateHideLabel() if Conf['JSON Index'] - -return ThreadHiding diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 0d86800aa6..bdf279bc72 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -257,5 +257,3 @@ Build = $.addClass $('.file-count', root), 'warning' root - -return Build diff --git a/src/General/Get.coffee b/src/General/Get.coffee index d84abb957c..dceb0b36a9 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -68,5 +68,3 @@ Get = for script in $$ 'script:not([src])', d.head return script.textContent if /\bcooldowns *=/.test script.textContent '' - -return Get diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 99994af799..d79b46304c 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -543,5 +543,3 @@ Header = $.set 'Desktop Notifications', false notice.close() notice = new Notice 'info', el - -return Header diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 631ec9746a..272d0477fe 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -773,5 +773,3 @@ Index = for keyword in keywords return false if -1 is text.indexOf keyword return true - -return Index diff --git a/src/General/Polyfill.coffee b/src/General/Polyfill.coffee index a6f5b24428..df2f7c0305 100644 --- a/src/General/Polyfill.coffee +++ b/src/General/Polyfill.coffee @@ -13,5 +13,3 @@ Polyfill = ui8a[i] = data.charCodeAt i cb new Blob [ui8a], {type} $.globalEval "HTMLCanvasElement.prototype.toBlob = (#{HTMLCanvasElement::toBlob});" - -return Polyfill diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 0d3cf5ab18..47dd82a1e4 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -657,5 +657,3 @@ Settings = return unless (key = Keybinds.keyCode e)? @value = key $.cb.value.call @ - -return Settings diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 66381bf94c..2a22e4eca1 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -388,5 +388,3 @@ UI = { hover: hoverstart checkbox: checkbox } - -return UI diff --git a/src/Images/FappeTyme.coffee b/src/Images/FappeTyme.coffee index 14831968a0..bc627f47b2 100644 --- a/src/Images/FappeTyme.coffee +++ b/src/Images/FappeTyme.coffee @@ -60,5 +60,3 @@ FappeTyme = toggle: (type) -> @set type, !@enabled[type] $.cb.checked.call @nodes[type] if type is 'werk' - -return FappeTyme diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 0d9c3e9e64..a068eb9376 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -368,5 +368,3 @@ Gallery = subEntries.push el: delayLabel subEntries - -return Gallery diff --git a/src/Images/ImageCommon.coffee b/src/Images/ImageCommon.coffee index 489905755f..4ee9bb1328 100644 --- a/src/Images/ImageCommon.coffee +++ b/src/Images/ImageCommon.coffee @@ -94,5 +94,3 @@ ImageCommon = $.rm a else new Notice 'warning', "Could not download #{href}", 20 - -return ImageCommon diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index d804abc447..3c5b3fe726 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -302,5 +302,3 @@ ImageExpand = $.event 'change', null, input $.on input, 'change', $.cb.checked el: label - -return ImageExpand diff --git a/src/Images/ImageHover.coffee b/src/Images/ImageHover.coffee index b05095d3a0..91cc64dcca 100644 --- a/src/Images/ImageHover.coffee +++ b/src/Images/ImageHover.coffee @@ -74,5 +74,3 @@ ImageHover = @src = URL + if @src is URL then '?' + Date.now() else '' else $.rm @ - -return ImageHover diff --git a/src/Images/ImageLoader.coffee b/src/Images/ImageLoader.coffee index 306eddbb61..4362f6d198 100644 --- a/src/Images/ImageLoader.coffee +++ b/src/Images/ImageLoader.coffee @@ -89,5 +89,3 @@ ImageLoader = {thumb} = post.file if Header.isNodeVisible(thumb) or post.nodes.root is qpClone then thumb.play() else thumb.pause() return - -return ImageLoader diff --git a/src/Images/Metadata.coffee b/src/Images/Metadata.coffee index 68bebd6f34..76417ee1aa 100644 --- a/src/Images/Metadata.coffee +++ b/src/Images/Metadata.coffee @@ -60,5 +60,3 @@ Metadata = else unless element in [0x8538067, 0x549A966] # Segment, Info i += size null - -return Metadata diff --git a/src/Images/RevealSpoilers.coffee b/src/Images/RevealSpoilers.coffee index b63163b694..e0687ed27b 100644 --- a/src/Images/RevealSpoilers.coffee +++ b/src/Images/RevealSpoilers.coffee @@ -17,5 +17,3 @@ RevealSpoilers = thumb.src = @file.thumbURL else thumb.dataset.src = @file.thumbURL - -return RevealSpoilers diff --git a/src/Images/Sauce.coffee b/src/Images/Sauce.coffee index b699dfe99c..f8b1e7301f 100644 --- a/src/Images/Sauce.coffee +++ b/src/Images/Sauce.coffee @@ -98,5 +98,3 @@ Sauce = name: (post) -> post.file.name '%': -> '%' semi: -> ';' - -return Sauce diff --git a/src/Images/Volume.coffee b/src/Images/Volume.coffee index eb767d6d4d..c13831a15c 100644 --- a/src/Images/Volume.coffee +++ b/src/Images/Volume.coffee @@ -78,5 +78,3 @@ Volume = volume /= 1.1 if e.deltaY > 0 el.volume = $.minmax volume - 0.1, 0, 1 e.preventDefault() - -return Volume diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index 00b6ea54fc..295a882d4f 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -402,5 +402,3 @@ Embedding = return item.snippet.title 'Not Found' ] - -return Embedding diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 5307b06d21..a97390a4b9 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -155,5 +155,3 @@ Linkify = range.insertNode a a - -return Linkify diff --git a/src/Menu/ArchiveLink.coffee b/src/Menu/ArchiveLink.coffee index a2db55abc8..9446dce88e 100644 --- a/src/Menu/ArchiveLink.coffee +++ b/src/Menu/ArchiveLink.coffee @@ -55,5 +55,3 @@ ArchiveLink = el: el open: open } - -return ArchiveLink diff --git a/src/Menu/DeleteLink.coffee b/src/Menu/DeleteLink.coffee index 3033e515f3..870fc9ddf7 100644 --- a/src/Menu/DeleteLink.coffee +++ b/src/Menu/DeleteLink.coffee @@ -132,5 +132,3 @@ DeleteLink = for fileOnly in [false, true] when DeleteLink.auto[+fileOnly][post.fullID] DeleteLink.delete post, fileOnly return - -return DeleteLink diff --git a/src/Menu/DownloadLink.coffee b/src/Menu/DownloadLink.coffee index 3b787d8da9..f5973ae78a 100644 --- a/src/Menu/DownloadLink.coffee +++ b/src/Menu/DownloadLink.coffee @@ -17,5 +17,3 @@ DownloadLink = a.href = file.url a.download = file.name true - -return DownloadLink diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 538523737c..2bfca41404 100644 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -34,5 +34,3 @@ Menu = $.on button, 'click', (e) -> Menu.menu.toggle e, @, post button - -return Menu diff --git a/src/Menu/ReportLink.coffee b/src/Menu/ReportLink.coffee index 5907670326..cb666a5355 100644 --- a/src/Menu/ReportLink.coffee +++ b/src/Menu/ReportLink.coffee @@ -32,5 +32,3 @@ ReportLink = id = Date.now() set = "toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,#{dims}" window.open url, id, set - -return ReportLink diff --git a/src/Miscellaneous/AntiAutoplay.coffee b/src/Miscellaneous/AntiAutoplay.coffee index 60d3308abc..a8354e0e3f 100644 --- a/src/Miscellaneous/AntiAutoplay.coffee +++ b/src/Miscellaneous/AntiAutoplay.coffee @@ -31,5 +31,3 @@ AntiAutoplay = object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '') $.addClass object, 'autoplay-removed' return - -return AntiAutoplay diff --git a/src/Miscellaneous/Banner.coffee b/src/Miscellaneous/Banner.coffee index 89a8794470..0e410b2892 100644 --- a/src/Miscellaneous/Banner.coffee +++ b/src/Miscellaneous/Banner.coffee @@ -107,5 +107,3 @@ Banner = child.textContent = data.title else Banner.db.delete {boardID: g.BOARD.ID, threadID: className} - -return Banner diff --git a/src/Miscellaneous/CatalogLinks.coffee b/src/Miscellaneous/CatalogLinks.coffee index 5f23fe174c..72155a6a06 100644 --- a/src/Miscellaneous/CatalogLinks.coffee +++ b/src/Miscellaneous/CatalogLinks.coffee @@ -86,5 +86,3 @@ CatalogLinks = if g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "/#{board}/#index" else "/#{board}/" - -return CatalogLinks diff --git a/src/Miscellaneous/CustomCSS.coffee b/src/Miscellaneous/CustomCSS.coffee index 67e8d0057c..a6f6217937 100644 --- a/src/Miscellaneous/CustomCSS.coffee +++ b/src/Miscellaneous/CustomCSS.coffee @@ -15,5 +15,3 @@ CustomCSS = unless @style return @addStyle() @style.textContent = Conf['usercss'] - -return CustomCSS diff --git a/src/Miscellaneous/ExpandComment.coffee b/src/Miscellaneous/ExpandComment.coffee index 263c99c910..4935e7ac4b 100644 --- a/src/Miscellaneous/ExpandComment.coffee +++ b/src/Miscellaneous/ExpandComment.coffee @@ -71,5 +71,3 @@ ExpandComment = for callback in ExpandComment.callbacks callback.call post return - -return ExpandComment diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index 738842881c..344544c7b0 100644 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -103,5 +103,3 @@ ExpandThread = postsCount = postsRoot.length a.textContent = Build.summaryText '-', postsCount, filesCount - -return ExpandThread diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 374580b134..1820b153d3 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -56,5 +56,3 @@ FileInfo = r: -> <%= html('${this.file.dimensions || "PDF"}') %> g: -> <%= html('?{this.file.tag}{, ${this.file.tag}}{}') %> '%': -> <%= html('%') %> - -return FileInfo diff --git a/src/Miscellaneous/Flash.coffee b/src/Miscellaneous/Flash.coffee index 02ed6a4afd..22f98ac08e 100644 --- a/src/Miscellaneous/Flash.coffee +++ b/src/Miscellaneous/Flash.coffee @@ -10,5 +10,3 @@ Flash = if g.VIEW is 'thread' $.global -> window.Main.tid = location.pathname.split(/\/+/)[3] $.global -> window.SWFEmbed.init() - -return Flash diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index a75086683e..9629e3a749 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -73,5 +73,3 @@ Fourchan = $.event 'mathjax', null, @nodes.comment $.on d, 'PostsInserted', cb cb() - -return Fourchan diff --git a/src/Miscellaneous/IDColor.coffee b/src/Miscellaneous/IDColor.coffee index 515c48c7b5..9d956c3fef 100644 --- a/src/Miscellaneous/IDColor.coffee +++ b/src/Miscellaneous/IDColor.coffee @@ -47,5 +47,3 @@ IDColor = while i < 8 msg = (msg << 5) - msg + uid.charCodeAt i++ msg - -return IDColor diff --git a/src/Miscellaneous/IDHighlight.coffee b/src/Miscellaneous/IDHighlight.coffee index 52ddcb47b5..759a8b607c 100644 --- a/src/Miscellaneous/IDHighlight.coffee +++ b/src/Miscellaneous/IDHighlight.coffee @@ -21,5 +21,3 @@ IDHighlight = uniqueID = post.info.uniqueID or post.info.capcode IDHighlight.uniqueID = if IDHighlight.uniqueID is uniqueID then null else uniqueID g.posts.forEach IDHighlight.set - -return IDHighlight diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 1ce5a7a842..ea2addd880 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -325,5 +325,3 @@ Keybinds = focus: (post) -> $.addClass post, 'highlight' - -return Keybinds diff --git a/src/Miscellaneous/Nav.coffee b/src/Miscellaneous/Nav.coffee index 1aaabee283..71227374b5 100644 --- a/src/Miscellaneous/Nav.coffee +++ b/src/Miscellaneous/Nav.coffee @@ -77,5 +77,3 @@ Nav = d.body.style.marginBottom = null delete Nav.haveExtra $.off d, 'scroll', Nav.removeExtra - -return Nav diff --git a/src/Miscellaneous/NormalizeURL.coffee b/src/Miscellaneous/NormalizeURL.coffee index a0ff418f86..f059ef72ad 100644 --- a/src/Miscellaneous/NormalizeURL.coffee +++ b/src/Miscellaneous/NormalizeURL.coffee @@ -12,5 +12,3 @@ NormalizeURL = pathname = pathname.join '/' if location.pathname isnt pathname history.replaceState history.state, '', "#{location.protocol}//#{location.host}#{pathname}#{location.hash}" - -return NormalizeURL diff --git a/src/Miscellaneous/PSAHiding.coffee b/src/Miscellaneous/PSAHiding.coffee index 6945e7f6ef..cd55720d3c 100644 --- a/src/Miscellaneous/PSAHiding.coffee +++ b/src/Miscellaneous/PSAHiding.coffee @@ -54,5 +54,3 @@ PSAHiding = $.after $.id('globalToggle'), psa PSAHiding.hr?.hidden = PSAHiding.hidden return - -return PSAHiding diff --git a/src/Miscellaneous/RelativeDates.coffee b/src/Miscellaneous/RelativeDates.coffee index 89e00d2ac3..e7b1106e21 100644 --- a/src/Miscellaneous/RelativeDates.coffee +++ b/src/Miscellaneous/RelativeDates.coffee @@ -119,5 +119,3 @@ RelativeDates = return if data in RelativeDates.stale # We can call RelativeDates.update() multiple times. return if data instanceof Post and !g.posts[data.fullID] # collected post. RelativeDates.stale.push data - -return RelativeDates diff --git a/src/Miscellaneous/RemoveSpoilers.coffee b/src/Miscellaneous/RemoveSpoilers.coffee index f15c8516fa..47ee75a8da 100644 --- a/src/Miscellaneous/RemoveSpoilers.coffee +++ b/src/Miscellaneous/RemoveSpoilers.coffee @@ -26,5 +26,3 @@ RemoveSpoilers = $.replace spoiler, span $.add span, [spoiler.childNodes...] return - -return RemoveSpoilers diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee index 6daba588a9..27f752496d 100644 --- a/src/Miscellaneous/Report.coffee +++ b/src/Miscellaneous/Report.coffee @@ -65,5 +65,3 @@ Report = if types = $.id('reportTypes') $.on types, 'change', (e) -> $('form').action = if e.target.value is 'illegal' then '#redirect' else '' - -return Report diff --git a/src/Miscellaneous/ThreadLinks.coffee b/src/Miscellaneous/ThreadLinks.coffee index 30cc92c6d8..2edd4d45de 100644 --- a/src/Miscellaneous/ThreadLinks.coffee +++ b/src/Miscellaneous/ThreadLinks.coffee @@ -18,5 +18,3 @@ ThreadLinks = process: (link) -> link.target = '_blank' - -return ThreadLinks diff --git a/src/Miscellaneous/Time.coffee b/src/Miscellaneous/Time.coffee index 3b195e61cc..8e9128ea66 100644 --- a/src/Miscellaneous/Time.coffee +++ b/src/Miscellaneous/Time.coffee @@ -62,5 +62,3 @@ Time = y: -> @getFullYear().toString()[2..] Y: -> @getFullYear() '%': -> '%' - -return Time diff --git a/src/Monitoring/Favicon.coffee b/src/Monitoring/Favicon.coffee index 0b5235b49d..467ccf7ad5 100644 --- a/src/Monitoring/Favicon.coffee +++ b/src/Monitoring/Favicon.coffee @@ -80,5 +80,3 @@ Favicon = dead: 'data:image/gif;base64,<%= readBase64('dead.gif') %>' logo: 'data:image/png;base64,<%= readBase64('/src/meta/icon128.png') %>' - -return Favicon diff --git a/src/Monitoring/MarkNewIPs.coffee b/src/Monitoring/MarkNewIPs.coffee index 6f6bcdfa2a..f9c52b4c8a 100644 --- a/src/Monitoring/MarkNewIPs.coffee +++ b/src/Monitoring/MarkNewIPs.coffee @@ -40,5 +40,3 @@ MarkNewIPs = markOld: (post) -> post.nodes.nameBlock.title = 'Not the first post from this IP.' $.addClass post.nodes.root, 'old-ip' - -return MarkNewIPs diff --git a/src/Monitoring/ReplyPruning.coffee b/src/Monitoring/ReplyPruning.coffee index 3c9524f73d..9e899472b1 100644 --- a/src/Monitoring/ReplyPruning.coffee +++ b/src/Monitoring/ReplyPruning.coffee @@ -127,5 +127,3 @@ ReplyPruning = # Maintain position in thread when posts are added/removed above if hidden1 isnt hidden2 and (boardTop = Header.getTopOf $('.board')) < 0 window.scrollBy 0, Math.max(d.body.clientHeight - oldPos, window.scrollY + boardTop) - window.scrollY - -return ReplyPruning diff --git a/src/Monitoring/ThreadExcerpt.coffee b/src/Monitoring/ThreadExcerpt.coffee index b002648add..f0f4ca5454 100644 --- a/src/Monitoring/ThreadExcerpt.coffee +++ b/src/Monitoring/ThreadExcerpt.coffee @@ -6,5 +6,3 @@ ThreadExcerpt = name: 'Thread Excerpt' cb: @node node: -> d.title = Get.threadExcerpt @ - -return ThreadExcerpt diff --git a/src/Monitoring/ThreadStats.coffee b/src/Monitoring/ThreadStats.coffee index 40e6f4d648..6c8a83edce 100644 --- a/src/Monitoring/ThreadStats.coffee +++ b/src/Monitoring/ThreadStats.coffee @@ -102,5 +102,3 @@ ThreadStats = if g.BOARD.ID isnt 'f' and ThreadStats.lastPost > ThreadStats.lastPageUpdate and ThreadStats.pageCountEl?.textContent isnt '1' clearTimeout ThreadStats.timeout ThreadStats.timeout = setTimeout ThreadStats.fetchPage, 5 * $.SECOND - -return ThreadStats diff --git a/src/Monitoring/ThreadUpdater.coffee b/src/Monitoring/ThreadUpdater.coffee index 351145f7cd..099aabb4b2 100644 --- a/src/Monitoring/ThreadUpdater.coffee +++ b/src/Monitoring/ThreadUpdater.coffee @@ -360,5 +360,3 @@ ThreadUpdater = postCount: OP.replies + 1 fileCount: OP.images + !!OP.fsize ipCount: OP.unique_ips - -return ThreadUpdater diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 8201c75eec..4077d370f3 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -482,5 +482,3 @@ ThreadWatcher = $.on input, 'change', ThreadWatcher.refresh if name in ['Current Board', 'Show Unread Count'] $.on input, 'change', ThreadWatcher.fetchAuto if name in ['Show Unread Count', 'Auto Update Thread Watcher'] entry - -return ThreadWatcher diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 257be4440d..679bd4557d 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -252,5 +252,3 @@ Unread = Favicon[if isDead then 'dead' else 'default'] # `favicon.href = href` doesn't work on Firefox. $.add d.head, Favicon.el - -return Unread diff --git a/src/Posting/PassLink.coffee b/src/Posting/PassLink.coffee index 7f5bbe8bcb..e518e86bb2 100644 --- a/src/Posting/PassLink.coffee +++ b/src/Posting/PassLink.coffee @@ -14,5 +14,3 @@ PassLink = Date.now() 'width=500,height=280,toolbar=0' $.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')] - -return PassLink diff --git a/src/Posting/PostSuccessful.coffee b/src/Posting/PostSuccessful.coffee index 982341c832..ca791b7e5c 100644 --- a/src/Posting/PostSuccessful.coffee +++ b/src/Posting/PostSuccessful.coffee @@ -16,5 +16,3 @@ PostSuccessful = threadID: threadID postID: postID val: true - -return PostSuccessful diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 06d2fbfac3..0ec8af7def 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -827,5 +827,3 @@ QR = QR.cooldown.auto = false QR.notifications.push new Notice 'info', 'QR upload aborted.', 5 QR.status() - -return QR diff --git a/src/Quotelinks/QuoteBacklink.coffee b/src/Quotelinks/QuoteBacklink.coffee index ed5e3c73c2..1250ac728f 100644 --- a/src/Quotelinks/QuoteBacklink.coffee +++ b/src/Quotelinks/QuoteBacklink.coffee @@ -58,5 +58,3 @@ QuoteBacklink = getContainer: (id) -> @containers[id] or= $.el 'span', className: 'container' - -return QuoteBacklink diff --git a/src/Quotelinks/QuoteCT.coffee b/src/Quotelinks/QuoteCT.coffee index 076865fc7a..97563787ce 100644 --- a/src/Quotelinks/QuoteCT.coffee +++ b/src/Quotelinks/QuoteCT.coffee @@ -23,5 +23,3 @@ QuoteCT = if boardID is board.ID and threadID isnt thread.ID $.add quotelink, $.tn QuoteCT.text return - -return QuoteCT diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index 7e2f5a554e..d165b67598 100644 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -110,5 +110,3 @@ QuoteInline = QuoteInline.rm inlined, boardID, threadID, postID, context $.rmClass inlined, 'inlined' return - -return QuoteInline diff --git a/src/Quotelinks/QuoteOP.coffee b/src/Quotelinks/QuoteOP.coffee index 482993ab9f..7a4a026128 100644 --- a/src/Quotelinks/QuoteOP.coffee +++ b/src/Quotelinks/QuoteOP.coffee @@ -34,5 +34,3 @@ QuoteOP = if "#{boardID}.#{postID}" is fullID $.add quotelink, $.tn QuoteOP.text return - -return QuoteOP diff --git a/src/Quotelinks/QuotePreview.coffee b/src/Quotelinks/QuotePreview.coffee index 123f864064..a32898d11b 100644 --- a/src/Quotelinks/QuotePreview.coffee +++ b/src/Quotelinks/QuotePreview.coffee @@ -53,5 +53,3 @@ QuotePreview = for post in [post].concat post.clones $.rmClass post.nodes.post, 'qphl' return - -return QuotePreview diff --git a/src/Quotelinks/QuoteStrikeThrough.coffee b/src/Quotelinks/QuoteStrikeThrough.coffee index a22afbb869..e566da9bf9 100644 --- a/src/Quotelinks/QuoteStrikeThrough.coffee +++ b/src/Quotelinks/QuoteStrikeThrough.coffee @@ -14,5 +14,3 @@ QuoteStrikeThrough = if g.posts["#{boardID}.#{postID}"]?.isHidden $.addClass quotelink, 'filtered' return - -return QuoteStrikeThrough diff --git a/src/Quotelinks/QuoteThreading.coffee b/src/Quotelinks/QuoteThreading.coffee index a1da9d1d4d..3f30297a41 100644 --- a/src/Quotelinks/QuoteThreading.coffee +++ b/src/Quotelinks/QuoteThreading.coffee @@ -146,5 +146,3 @@ QuoteThreading = Unread.setLine true Unread.read() Unread.update() - -return QuoteThreading diff --git a/src/Quotelinks/QuoteYou.coffee b/src/Quotelinks/QuoteYou.coffee index 989cad04ae..7041382b4c 100644 --- a/src/Quotelinks/QuoteYou.coffee +++ b/src/Quotelinks/QuoteYou.coffee @@ -72,5 +72,3 @@ QuoteYou = Header.scrollTo post $.addClass post, 'highlight' return true - -return QuoteYou diff --git a/src/Quotelinks/Quotify.coffee b/src/Quotelinks/Quotify.coffee index 301d32b7e8..604550fc54 100644 --- a/src/Quotelinks/Quotify.coffee +++ b/src/Quotelinks/Quotify.coffee @@ -99,5 +99,3 @@ Quotify = $.before deadlink, green $.add green, deadlink $.replace deadlink, [deadlink.childNodes...] - -return Quotify diff --git a/src/classes/Board.coffee b/src/classes/Board.coffee index 2701715336..7f811d4636 100644 --- a/src/classes/Board.coffee +++ b/src/classes/Board.coffee @@ -6,5 +6,3 @@ class Board @posts = new SimpleDict() g.boards[@] = @ - -return Board diff --git a/src/classes/Callbacks.coffee b/src/classes/Callbacks.coffee index db84a8451c..fbe2252847 100644 --- a/src/classes/Callbacks.coffee +++ b/src/classes/Callbacks.coffee @@ -22,5 +22,3 @@ class Callbacks html: node.nodes?.root?.outerHTML Main.handleErrors errors if errors - -return Callbacks diff --git a/src/classes/CatalogThread.coffee b/src/classes/CatalogThread.coffee index ba2c3ce6f9..041692a679 100644 --- a/src/classes/CatalogThread.coffee +++ b/src/classes/CatalogThread.coffee @@ -13,5 +13,3 @@ class CatalogThread pageCount: $ '.page-count', root comment: $ '.comment', root @thread.catalogView = @ - -return CatalogThread diff --git a/src/classes/Connection.coffee b/src/classes/Connection.coffee index 810f3341e6..fc2c001bed 100644 --- a/src/classes/Connection.coffee +++ b/src/classes/Connection.coffee @@ -20,5 +20,3 @@ class Connection for type, value of data @cb[type]? value return - -return Connection diff --git a/src/classes/DataBoard.coffee b/src/classes/DataBoard.coffee index 1890a42345..d810a3071e 100644 --- a/src/classes/DataBoard.coffee +++ b/src/classes/DataBoard.coffee @@ -105,5 +105,3 @@ class DataBoard onSync: (data) => @data = data or boards: {} @sync?() - -return DataBoard diff --git a/src/classes/Fetcher.coffee b/src/classes/Fetcher.coffee index 1125934ded..46f8d59aaa 100644 --- a/src/classes/Fetcher.coffee +++ b/src/classes/Fetcher.coffee @@ -220,5 +220,3 @@ class Fetcher '[/green]': <%= html('') %> '[blue]': <%= html('') %> '[/blue]': <%= html('') %> - -return Fetcher diff --git a/src/classes/Notice.coffee b/src/classes/Notice.coffee index fea553941b..6478c1e944 100644 --- a/src/classes/Notice.coffee +++ b/src/classes/Notice.coffee @@ -30,5 +30,3 @@ class Notice $.off d, 'visibilitychange', @add $.rm @el @onclose?() - -return Notice diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 7ac804a271..9aebf6937a 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -249,5 +249,3 @@ class Post for clone in @clones[index..] clone.nodes.root.dataset.clone = index++ return - -return Post diff --git a/src/classes/RandomAccessList.coffee b/src/classes/RandomAccessList.coffee index 7143d6abae..b37fe246af 100644 --- a/src/classes/RandomAccessList.coffee +++ b/src/classes/RandomAccessList.coffee @@ -87,5 +87,3 @@ class RandomAccessList next.prev = prev else @last = prev - -return RandomAccessList diff --git a/src/classes/ShimSet.coffee b/src/classes/ShimSet.coffee index 599834c75b..b48d6e1608 100644 --- a/src/classes/ShimSet.coffee +++ b/src/classes/ShimSet.coffee @@ -14,5 +14,3 @@ class ShimSet @size-- window.Set = ShimSet unless 'Set' of window - -return ShimSet diff --git a/src/classes/SimpleDict.coffee b/src/classes/SimpleDict.coffee index f9c354e099..6c6b3edfd4 100644 --- a/src/classes/SimpleDict.coffee +++ b/src/classes/SimpleDict.coffee @@ -16,5 +16,3 @@ class SimpleDict forEach: (fn) -> fn @[key] for key in [@keys...] return - -return SimpleDict diff --git a/src/classes/Thread.coffee b/src/classes/Thread.coffee index ec11ba58cb..1ae53e95a1 100644 --- a/src/classes/Thread.coffee +++ b/src/classes/Thread.coffee @@ -76,5 +76,3 @@ class Thread @posts.forEach (post) -> post.collect() g.threads.rm @fullID @board.threads.rm @ - -return Thread diff --git a/src/config/Config.coffee b/src/config/Config.coffee index 8feff9b6aa..e9c93b4316 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -1040,5 +1040,3 @@ Config = 'Max Replies': 1000 'Autohiding Scrollbar': false - -return Config diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 30c9e900c7..7fd367b241 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -500,5 +500,3 @@ Main = ['Build Test', Build.Test] <% } %> ] - -return Main diff --git a/src/platform/$$.coffee b/src/platform/$$.coffee index d1c2b1258f..4c54223abc 100644 --- a/src/platform/$$.coffee +++ b/src/platform/$$.coffee @@ -1,4 +1,2 @@ $$ = (selector, root=d.body) -> [root.querySelectorAll(selector)...] - -return $$ diff --git a/src/platform/$.coffee b/src/platform/$.coffee index e86cb7de4d..b29839078e 100644 --- a/src/platform/$.coffee +++ b/src/platform/$.coffee @@ -596,5 +596,3 @@ $.clear = (cb) -> $.delete $.listValues().map (key) -> key.replace g.NAMESPACE, '' cb?() <% } %> - -return $ diff --git a/src/platform/CrossOrigin.coffee b/src/platform/CrossOrigin.coffee index 65419f9772..d7802b6059 100644 --- a/src/platform/CrossOrigin.coffee +++ b/src/platform/CrossOrigin.coffee @@ -126,5 +126,3 @@ CrossOrigin = delete callbacks[url] responses[url] = response <% } %> - -return CrossOrigin diff --git a/tools/chain.js b/tools/chain.js index 504709ddb7..b239953d8b 100644 --- a/tools/chain.js +++ b/tools/chain.js @@ -10,8 +10,12 @@ for (var name of process.argv.slice(2)) { script = script.replace(/\r\n/g, '\n'); script = template(script, {type: parts[2]}, sourceName); if (parts[4] === 'coffee') { + var definesVar = /^[$A-Z][$\w]*$/.test(parts[3]); + if (definesVar) { + script = `${script}\nreturn ${parts[3]};\n`; + } script = coffee.compile(script); - if (/^[$A-Z][$\w]*$/.test(parts[3])) { + if (definesVar) { script = `${parts[3]} = ${script}`; } }