Skip to content

Commit

Permalink
Have return hack be added by the compilation script.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccd0 committed Jun 12, 2016
1 parent 9c1bf5b commit e1b0d62
Show file tree
Hide file tree
Showing 88 changed files with 5 additions and 175 deletions.
2 changes: 0 additions & 2 deletions src/Archive/Redirect.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,3 @@ Redirect =
location.replace url
else if alternative
location.replace alternative

return Redirect
2 changes: 0 additions & 2 deletions src/Filtering/Anonymize.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ Anonymize =
name.textContent = 'Anonymous' for name in $$ '.name'
$.rm trip for trip in $$ '.postertrip'
return

return Anonymize
2 changes: 0 additions & 2 deletions src/Filtering/Filter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,3 @@ Filter =
tl = ta.textLength
ta.setSelectionRange tl, tl
ta.focus()

return Filter
2 changes: 0 additions & 2 deletions src/Filtering/PostHiding.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,3 @@ PostHiding =
for quotelink in Get.allQuotelinksLinkingTo post
$.rmClass quotelink, 'filtered'
return

return PostHiding
2 changes: 0 additions & 2 deletions src/Filtering/Recursive.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ Recursive =
g.posts.forEach (post) ->
if fullID in post.quotes
recursive post, args...

return Recursive
2 changes: 0 additions & 2 deletions src/Filtering/ThreadHiding.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,3 @@ ThreadHiding =
threadRoot = thread.OP.nodes.root.parentNode
threadRoot.hidden = thread.isHidden = false
Index.updateHideLabel() if Conf['JSON Index']

return ThreadHiding
2 changes: 0 additions & 2 deletions src/General/Build.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,3 @@ Build =
$.addClass $('.file-count', root), 'warning'

root

return Build
2 changes: 0 additions & 2 deletions src/General/Get.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,3 @@ Get =
for script in $$ 'script:not([src])', d.head
return script.textContent if /\bcooldowns *=/.test script.textContent
''

return Get
2 changes: 0 additions & 2 deletions src/General/Header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -543,5 +543,3 @@ Header =
$.set 'Desktop Notifications', false
notice.close()
notice = new Notice 'info', el

return Header
2 changes: 0 additions & 2 deletions src/General/Index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -773,5 +773,3 @@ Index =
for keyword in keywords
return false if -1 is text.indexOf keyword
return true

return Index
2 changes: 0 additions & 2 deletions src/General/Polyfill.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ Polyfill =
ui8a[i] = data.charCodeAt i
cb new Blob [ui8a], {type}
$.globalEval "HTMLCanvasElement.prototype.toBlob = (#{HTMLCanvasElement::toBlob});"

return Polyfill
2 changes: 0 additions & 2 deletions src/General/Settings.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -657,5 +657,3 @@ Settings =
return unless (key = Keybinds.keyCode e)?
@value = key
$.cb.value.call @

return Settings
2 changes: 0 additions & 2 deletions src/General/UI.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -388,5 +388,3 @@ UI = {
hover: hoverstart
checkbox: checkbox
}

return UI
2 changes: 0 additions & 2 deletions src/Images/FappeTyme.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ FappeTyme =
toggle: (type) ->
@set type, !@enabled[type]
$.cb.checked.call @nodes[type] if type is 'werk'

return FappeTyme
2 changes: 0 additions & 2 deletions src/Images/Gallery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -368,5 +368,3 @@ Gallery =
subEntries.push el: delayLabel

subEntries

return Gallery
2 changes: 0 additions & 2 deletions src/Images/ImageCommon.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,3 @@ ImageCommon =
$.rm a
else
new Notice 'warning', "Could not download #{href}", 20

return ImageCommon
2 changes: 0 additions & 2 deletions src/Images/ImageExpand.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,3 @@ ImageExpand =
$.event 'change', null, input
$.on input, 'change', $.cb.checked
el: label

return ImageExpand
2 changes: 0 additions & 2 deletions src/Images/ImageHover.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ ImageHover =
@src = URL + if @src is URL then '?' + Date.now() else ''
else
$.rm @

return ImageHover
2 changes: 0 additions & 2 deletions src/Images/ImageLoader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Images/Metadata.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ Metadata =
else unless element in [0x8538067, 0x549A966] # Segment, Info
i += size
null

return Metadata
2 changes: 0 additions & 2 deletions src/Images/RevealSpoilers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ RevealSpoilers =
thumb.src = @file.thumbURL
else
thumb.dataset.src = @file.thumbURL

return RevealSpoilers
2 changes: 0 additions & 2 deletions src/Images/Sauce.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,3 @@ Sauce =
name: (post) -> post.file.name
'%': -> '%'
semi: -> ';'

return Sauce
2 changes: 0 additions & 2 deletions src/Images/Volume.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,3 @@ Volume =
volume /= 1.1 if e.deltaY > 0
el.volume = $.minmax volume - 0.1, 0, 1
e.preventDefault()

return Volume
2 changes: 0 additions & 2 deletions src/Linkification/Embedding.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -402,5 +402,3 @@ Embedding =
return item.snippet.title
'Not Found'
]

return Embedding
2 changes: 0 additions & 2 deletions src/Linkification/Linkify.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,3 @@ Linkify =
range.insertNode a

a

return Linkify
2 changes: 0 additions & 2 deletions src/Menu/ArchiveLink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ ArchiveLink =
el: el
open: open
}

return ArchiveLink
2 changes: 0 additions & 2 deletions src/Menu/DeleteLink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,3 @@ DeleteLink =
for fileOnly in [false, true] when DeleteLink.auto[+fileOnly][post.fullID]
DeleteLink.delete post, fileOnly
return

return DeleteLink
2 changes: 0 additions & 2 deletions src/Menu/DownloadLink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ DownloadLink =
a.href = file.url
a.download = file.name
true

return DownloadLink
2 changes: 0 additions & 2 deletions src/Menu/Menu.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ Menu =
$.on button, 'click', (e) ->
Menu.menu.toggle e, @, post
button

return Menu
2 changes: 0 additions & 2 deletions src/Menu/ReportLink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/AntiAutoplay.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ AntiAutoplay =
object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
$.addClass object, 'autoplay-removed'
return

return AntiAutoplay
2 changes: 0 additions & 2 deletions src/Miscellaneous/Banner.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,3 @@ Banner =
child.textContent = data.title
else
Banner.db.delete {boardID: g.BOARD.ID, threadID: className}

return Banner
2 changes: 0 additions & 2 deletions src/Miscellaneous/CatalogLinks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/CustomCSS.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ CustomCSS =
unless @style
return @addStyle()
@style.textContent = Conf['usercss']

return CustomCSS
2 changes: 0 additions & 2 deletions src/Miscellaneous/ExpandComment.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,3 @@ ExpandComment =
for callback in ExpandComment.callbacks
callback.call post
return

return ExpandComment
2 changes: 0 additions & 2 deletions src/Miscellaneous/ExpandThread.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,3 @@ ExpandThread =

postsCount = postsRoot.length
a.textContent = Build.summaryText '-', postsCount, filesCount

return ExpandThread
2 changes: 0 additions & 2 deletions src/Miscellaneous/FileInfo.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,3 @@ FileInfo =
r: -> <%= html('${this.file.dimensions || "PDF"}') %>
g: -> <%= html('?{this.file.tag}{, ${this.file.tag}}{}') %>
'%': -> <%= html('%') %>

return FileInfo
2 changes: 0 additions & 2 deletions src/Miscellaneous/Flash.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ Flash =
if g.VIEW is 'thread'
$.global -> window.Main.tid = location.pathname.split(/\/+/)[3]
$.global -> window.SWFEmbed.init()

return Flash
2 changes: 0 additions & 2 deletions src/Miscellaneous/Fourchan.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,3 @@ Fourchan =
$.event 'mathjax', null, @nodes.comment
$.on d, 'PostsInserted', cb
cb()

return Fourchan
2 changes: 0 additions & 2 deletions src/Miscellaneous/IDColor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ IDColor =
while i < 8
msg = (msg << 5) - msg + uid.charCodeAt i++
msg

return IDColor
2 changes: 0 additions & 2 deletions src/Miscellaneous/IDHighlight.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/Keybinds.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,3 @@ Keybinds =

focus: (post) ->
$.addClass post, 'highlight'

return Keybinds
2 changes: 0 additions & 2 deletions src/Miscellaneous/Nav.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,3 @@ Nav =
d.body.style.marginBottom = null
delete Nav.haveExtra
$.off d, 'scroll', Nav.removeExtra

return Nav
2 changes: 0 additions & 2 deletions src/Miscellaneous/NormalizeURL.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/PSAHiding.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,3 @@ PSAHiding =
$.after $.id('globalToggle'), psa
PSAHiding.hr?.hidden = PSAHiding.hidden
return

return PSAHiding
2 changes: 0 additions & 2 deletions src/Miscellaneous/RelativeDates.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/RemoveSpoilers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ RemoveSpoilers =
$.replace spoiler, span
$.add span, [spoiler.childNodes...]
return

return RemoveSpoilers
2 changes: 0 additions & 2 deletions src/Miscellaneous/Report.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Miscellaneous/ThreadLinks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ ThreadLinks =

process: (link) ->
link.target = '_blank'

return ThreadLinks
2 changes: 0 additions & 2 deletions src/Miscellaneous/Time.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ Time =
y: -> @getFullYear().toString()[2..]
Y: -> @getFullYear()
'%': -> '%'

return Time
2 changes: 0 additions & 2 deletions src/Monitoring/Favicon.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Monitoring/MarkNewIPs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Monitoring/ReplyPruning.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Monitoring/ThreadExcerpt.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ ThreadExcerpt =
name: 'Thread Excerpt'
cb: @node
node: -> d.title = Get.threadExcerpt @

return ThreadExcerpt
2 changes: 0 additions & 2 deletions src/Monitoring/ThreadStats.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Monitoring/ThreadUpdater.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,3 @@ ThreadUpdater =
postCount: OP.replies + 1
fileCount: OP.images + !!OP.fsize
ipCount: OP.unique_ips

return ThreadUpdater
2 changes: 0 additions & 2 deletions src/Monitoring/ThreadWatcher.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Monitoring/Unread.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/Posting/PassLink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ PassLink =
Date.now()
'width=500,height=280,toolbar=0'
$.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')]

return PassLink
2 changes: 0 additions & 2 deletions src/Posting/PostSuccessful.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ PostSuccessful =
threadID: threadID
postID: postID
val: true

return PostSuccessful
2 changes: 0 additions & 2 deletions src/Posting/QR.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -827,5 +827,3 @@ QR =
QR.cooldown.auto = false
QR.notifications.push new Notice 'info', 'QR upload aborted.', 5
QR.status()

return QR
2 changes: 0 additions & 2 deletions src/Quotelinks/QuoteBacklink.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,3 @@ QuoteBacklink =
getContainer: (id) ->
@containers[id] or=
$.el 'span', className: 'container'

return QuoteBacklink
2 changes: 0 additions & 2 deletions src/Quotelinks/QuoteCT.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ QuoteCT =
if boardID is board.ID and threadID isnt thread.ID
$.add quotelink, $.tn QuoteCT.text
return

return QuoteCT
2 changes: 0 additions & 2 deletions src/Quotelinks/QuoteInline.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,3 @@ QuoteInline =
QuoteInline.rm inlined, boardID, threadID, postID, context
$.rmClass inlined, 'inlined'
return

return QuoteInline
2 changes: 0 additions & 2 deletions src/Quotelinks/QuoteOP.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ QuoteOP =
if "#{boardID}.#{postID}" is fullID
$.add quotelink, $.tn QuoteOP.text
return

return QuoteOP
2 changes: 0 additions & 2 deletions src/Quotelinks/QuotePreview.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ QuotePreview =
for post in [post].concat post.clones
$.rmClass post.nodes.post, 'qphl'
return

return QuotePreview
Loading

0 comments on commit e1b0d62

Please sign in to comment.