Have return hack be added by the compilation script.
This commit is contained in:
parent
9c1bf5bfdf
commit
e1b0d62ceb
@ -173,5 +173,3 @@ Redirect =
|
|||||||
location.replace url
|
location.replace url
|
||||||
else if alternative
|
else if alternative
|
||||||
location.replace alternative
|
location.replace alternative
|
||||||
|
|
||||||
return Redirect
|
|
||||||
|
|||||||
@ -24,5 +24,3 @@ Anonymize =
|
|||||||
name.textContent = 'Anonymous' for name in $$ '.name'
|
name.textContent = 'Anonymous' for name in $$ '.name'
|
||||||
$.rm trip for trip in $$ '.postertrip'
|
$.rm trip for trip in $$ '.postertrip'
|
||||||
return
|
return
|
||||||
|
|
||||||
return Anonymize
|
|
||||||
|
|||||||
@ -249,5 +249,3 @@ Filter =
|
|||||||
tl = ta.textLength
|
tl = ta.textLength
|
||||||
ta.setSelectionRange tl, tl
|
ta.setSelectionRange tl, tl
|
||||||
ta.focus()
|
ta.focus()
|
||||||
|
|
||||||
return Filter
|
|
||||||
|
|||||||
@ -215,5 +215,3 @@ PostHiding =
|
|||||||
for quotelink in Get.allQuotelinksLinkingTo post
|
for quotelink in Get.allQuotelinksLinkingTo post
|
||||||
$.rmClass quotelink, 'filtered'
|
$.rmClass quotelink, 'filtered'
|
||||||
return
|
return
|
||||||
|
|
||||||
return PostHiding
|
|
||||||
|
|||||||
@ -32,5 +32,3 @@ Recursive =
|
|||||||
g.posts.forEach (post) ->
|
g.posts.forEach (post) ->
|
||||||
if fullID in post.quotes
|
if fullID in post.quotes
|
||||||
recursive post, args...
|
recursive post, args...
|
||||||
|
|
||||||
return Recursive
|
|
||||||
|
|||||||
@ -189,5 +189,3 @@ ThreadHiding =
|
|||||||
threadRoot = thread.OP.nodes.root.parentNode
|
threadRoot = thread.OP.nodes.root.parentNode
|
||||||
threadRoot.hidden = thread.isHidden = false
|
threadRoot.hidden = thread.isHidden = false
|
||||||
Index.updateHideLabel() if Conf['JSON Index']
|
Index.updateHideLabel() if Conf['JSON Index']
|
||||||
|
|
||||||
return ThreadHiding
|
|
||||||
|
|||||||
@ -257,5 +257,3 @@ Build =
|
|||||||
$.addClass $('.file-count', root), 'warning'
|
$.addClass $('.file-count', root), 'warning'
|
||||||
|
|
||||||
root
|
root
|
||||||
|
|
||||||
return Build
|
|
||||||
|
|||||||
@ -68,5 +68,3 @@ Get =
|
|||||||
for script in $$ 'script:not([src])', d.head
|
for script in $$ 'script:not([src])', d.head
|
||||||
return script.textContent if /\bcooldowns *=/.test script.textContent
|
return script.textContent if /\bcooldowns *=/.test script.textContent
|
||||||
''
|
''
|
||||||
|
|
||||||
return Get
|
|
||||||
|
|||||||
@ -543,5 +543,3 @@ Header =
|
|||||||
$.set 'Desktop Notifications', false
|
$.set 'Desktop Notifications', false
|
||||||
notice.close()
|
notice.close()
|
||||||
notice = new Notice 'info', el
|
notice = new Notice 'info', el
|
||||||
|
|
||||||
return Header
|
|
||||||
|
|||||||
@ -773,5 +773,3 @@ Index =
|
|||||||
for keyword in keywords
|
for keyword in keywords
|
||||||
return false if -1 is text.indexOf keyword
|
return false if -1 is text.indexOf keyword
|
||||||
return true
|
return true
|
||||||
|
|
||||||
return Index
|
|
||||||
|
|||||||
@ -13,5 +13,3 @@ Polyfill =
|
|||||||
ui8a[i] = data.charCodeAt i
|
ui8a[i] = data.charCodeAt i
|
||||||
cb new Blob [ui8a], {type}
|
cb new Blob [ui8a], {type}
|
||||||
$.globalEval "HTMLCanvasElement.prototype.toBlob = (#{HTMLCanvasElement::toBlob});"
|
$.globalEval "HTMLCanvasElement.prototype.toBlob = (#{HTMLCanvasElement::toBlob});"
|
||||||
|
|
||||||
return Polyfill
|
|
||||||
|
|||||||
@ -657,5 +657,3 @@ Settings =
|
|||||||
return unless (key = Keybinds.keyCode e)?
|
return unless (key = Keybinds.keyCode e)?
|
||||||
@value = key
|
@value = key
|
||||||
$.cb.value.call @
|
$.cb.value.call @
|
||||||
|
|
||||||
return Settings
|
|
||||||
|
|||||||
@ -388,5 +388,3 @@ UI = {
|
|||||||
hover: hoverstart
|
hover: hoverstart
|
||||||
checkbox: checkbox
|
checkbox: checkbox
|
||||||
}
|
}
|
||||||
|
|
||||||
return UI
|
|
||||||
|
|||||||
@ -60,5 +60,3 @@ FappeTyme =
|
|||||||
toggle: (type) ->
|
toggle: (type) ->
|
||||||
@set type, !@enabled[type]
|
@set type, !@enabled[type]
|
||||||
$.cb.checked.call @nodes[type] if type is 'werk'
|
$.cb.checked.call @nodes[type] if type is 'werk'
|
||||||
|
|
||||||
return FappeTyme
|
|
||||||
|
|||||||
@ -368,5 +368,3 @@ Gallery =
|
|||||||
subEntries.push el: delayLabel
|
subEntries.push el: delayLabel
|
||||||
|
|
||||||
subEntries
|
subEntries
|
||||||
|
|
||||||
return Gallery
|
|
||||||
|
|||||||
@ -94,5 +94,3 @@ ImageCommon =
|
|||||||
$.rm a
|
$.rm a
|
||||||
else
|
else
|
||||||
new Notice 'warning', "Could not download #{href}", 20
|
new Notice 'warning', "Could not download #{href}", 20
|
||||||
|
|
||||||
return ImageCommon
|
|
||||||
|
|||||||
@ -302,5 +302,3 @@ ImageExpand =
|
|||||||
$.event 'change', null, input
|
$.event 'change', null, input
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
el: label
|
el: label
|
||||||
|
|
||||||
return ImageExpand
|
|
||||||
|
|||||||
@ -74,5 +74,3 @@ ImageHover =
|
|||||||
@src = URL + if @src is URL then '?' + Date.now() else ''
|
@src = URL + if @src is URL then '?' + Date.now() else ''
|
||||||
else
|
else
|
||||||
$.rm @
|
$.rm @
|
||||||
|
|
||||||
return ImageHover
|
|
||||||
|
|||||||
@ -89,5 +89,3 @@ ImageLoader =
|
|||||||
{thumb} = post.file
|
{thumb} = post.file
|
||||||
if Header.isNodeVisible(thumb) or post.nodes.root is qpClone then thumb.play() else thumb.pause()
|
if Header.isNodeVisible(thumb) or post.nodes.root is qpClone then thumb.play() else thumb.pause()
|
||||||
return
|
return
|
||||||
|
|
||||||
return ImageLoader
|
|
||||||
|
|||||||
@ -60,5 +60,3 @@ Metadata =
|
|||||||
else unless element in [0x8538067, 0x549A966] # Segment, Info
|
else unless element in [0x8538067, 0x549A966] # Segment, Info
|
||||||
i += size
|
i += size
|
||||||
null
|
null
|
||||||
|
|
||||||
return Metadata
|
|
||||||
|
|||||||
@ -17,5 +17,3 @@ RevealSpoilers =
|
|||||||
thumb.src = @file.thumbURL
|
thumb.src = @file.thumbURL
|
||||||
else
|
else
|
||||||
thumb.dataset.src = @file.thumbURL
|
thumb.dataset.src = @file.thumbURL
|
||||||
|
|
||||||
return RevealSpoilers
|
|
||||||
|
|||||||
@ -98,5 +98,3 @@ Sauce =
|
|||||||
name: (post) -> post.file.name
|
name: (post) -> post.file.name
|
||||||
'%': -> '%'
|
'%': -> '%'
|
||||||
semi: -> ';'
|
semi: -> ';'
|
||||||
|
|
||||||
return Sauce
|
|
||||||
|
|||||||
@ -78,5 +78,3 @@ Volume =
|
|||||||
volume /= 1.1 if e.deltaY > 0
|
volume /= 1.1 if e.deltaY > 0
|
||||||
el.volume = $.minmax volume - 0.1, 0, 1
|
el.volume = $.minmax volume - 0.1, 0, 1
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
return Volume
|
|
||||||
|
|||||||
@ -402,5 +402,3 @@ Embedding =
|
|||||||
return item.snippet.title
|
return item.snippet.title
|
||||||
'Not Found'
|
'Not Found'
|
||||||
]
|
]
|
||||||
|
|
||||||
return Embedding
|
|
||||||
|
|||||||
@ -155,5 +155,3 @@ Linkify =
|
|||||||
range.insertNode a
|
range.insertNode a
|
||||||
|
|
||||||
a
|
a
|
||||||
|
|
||||||
return Linkify
|
|
||||||
|
|||||||
@ -55,5 +55,3 @@ ArchiveLink =
|
|||||||
el: el
|
el: el
|
||||||
open: open
|
open: open
|
||||||
}
|
}
|
||||||
|
|
||||||
return ArchiveLink
|
|
||||||
|
|||||||
@ -132,5 +132,3 @@ DeleteLink =
|
|||||||
for fileOnly in [false, true] when DeleteLink.auto[+fileOnly][post.fullID]
|
for fileOnly in [false, true] when DeleteLink.auto[+fileOnly][post.fullID]
|
||||||
DeleteLink.delete post, fileOnly
|
DeleteLink.delete post, fileOnly
|
||||||
return
|
return
|
||||||
|
|
||||||
return DeleteLink
|
|
||||||
|
|||||||
@ -17,5 +17,3 @@ DownloadLink =
|
|||||||
a.href = file.url
|
a.href = file.url
|
||||||
a.download = file.name
|
a.download = file.name
|
||||||
true
|
true
|
||||||
|
|
||||||
return DownloadLink
|
|
||||||
|
|||||||
@ -34,5 +34,3 @@ Menu =
|
|||||||
$.on button, 'click', (e) ->
|
$.on button, 'click', (e) ->
|
||||||
Menu.menu.toggle e, @, post
|
Menu.menu.toggle e, @, post
|
||||||
button
|
button
|
||||||
|
|
||||||
return Menu
|
|
||||||
|
|||||||
@ -32,5 +32,3 @@ ReportLink =
|
|||||||
id = Date.now()
|
id = Date.now()
|
||||||
set = "toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,#{dims}"
|
set = "toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,#{dims}"
|
||||||
window.open url, id, set
|
window.open url, id, set
|
||||||
|
|
||||||
return ReportLink
|
|
||||||
|
|||||||
@ -31,5 +31,3 @@ AntiAutoplay =
|
|||||||
object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
||||||
$.addClass object, 'autoplay-removed'
|
$.addClass object, 'autoplay-removed'
|
||||||
return
|
return
|
||||||
|
|
||||||
return AntiAutoplay
|
|
||||||
|
|||||||
@ -107,5 +107,3 @@ Banner =
|
|||||||
child.textContent = data.title
|
child.textContent = data.title
|
||||||
else
|
else
|
||||||
Banner.db.delete {boardID: g.BOARD.ID, threadID: className}
|
Banner.db.delete {boardID: g.BOARD.ID, threadID: className}
|
||||||
|
|
||||||
return Banner
|
|
||||||
|
|||||||
@ -86,5 +86,3 @@ CatalogLinks =
|
|||||||
if g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "/#{board}/#index"
|
if g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "/#{board}/#index"
|
||||||
else
|
else
|
||||||
"/#{board}/"
|
"/#{board}/"
|
||||||
|
|
||||||
return CatalogLinks
|
|
||||||
|
|||||||
@ -15,5 +15,3 @@ CustomCSS =
|
|||||||
unless @style
|
unless @style
|
||||||
return @addStyle()
|
return @addStyle()
|
||||||
@style.textContent = Conf['usercss']
|
@style.textContent = Conf['usercss']
|
||||||
|
|
||||||
return CustomCSS
|
|
||||||
|
|||||||
@ -71,5 +71,3 @@ ExpandComment =
|
|||||||
for callback in ExpandComment.callbacks
|
for callback in ExpandComment.callbacks
|
||||||
callback.call post
|
callback.call post
|
||||||
return
|
return
|
||||||
|
|
||||||
return ExpandComment
|
|
||||||
|
|||||||
@ -103,5 +103,3 @@ ExpandThread =
|
|||||||
|
|
||||||
postsCount = postsRoot.length
|
postsCount = postsRoot.length
|
||||||
a.textContent = Build.summaryText '-', postsCount, filesCount
|
a.textContent = Build.summaryText '-', postsCount, filesCount
|
||||||
|
|
||||||
return ExpandThread
|
|
||||||
|
|||||||
@ -56,5 +56,3 @@ FileInfo =
|
|||||||
r: -> <%= html('${this.file.dimensions || "PDF"}') %>
|
r: -> <%= html('${this.file.dimensions || "PDF"}') %>
|
||||||
g: -> <%= html('?{this.file.tag}{, ${this.file.tag}}{}') %>
|
g: -> <%= html('?{this.file.tag}{, ${this.file.tag}}{}') %>
|
||||||
'%': -> <%= html('%') %>
|
'%': -> <%= html('%') %>
|
||||||
|
|
||||||
return FileInfo
|
|
||||||
|
|||||||
@ -10,5 +10,3 @@ Flash =
|
|||||||
if g.VIEW is 'thread'
|
if g.VIEW is 'thread'
|
||||||
$.global -> window.Main.tid = location.pathname.split(/\/+/)[3]
|
$.global -> window.Main.tid = location.pathname.split(/\/+/)[3]
|
||||||
$.global -> window.SWFEmbed.init()
|
$.global -> window.SWFEmbed.init()
|
||||||
|
|
||||||
return Flash
|
|
||||||
|
|||||||
@ -73,5 +73,3 @@ Fourchan =
|
|||||||
$.event 'mathjax', null, @nodes.comment
|
$.event 'mathjax', null, @nodes.comment
|
||||||
$.on d, 'PostsInserted', cb
|
$.on d, 'PostsInserted', cb
|
||||||
cb()
|
cb()
|
||||||
|
|
||||||
return Fourchan
|
|
||||||
|
|||||||
@ -47,5 +47,3 @@ IDColor =
|
|||||||
while i < 8
|
while i < 8
|
||||||
msg = (msg << 5) - msg + uid.charCodeAt i++
|
msg = (msg << 5) - msg + uid.charCodeAt i++
|
||||||
msg
|
msg
|
||||||
|
|
||||||
return IDColor
|
|
||||||
|
|||||||
@ -21,5 +21,3 @@ IDHighlight =
|
|||||||
uniqueID = post.info.uniqueID or post.info.capcode
|
uniqueID = post.info.uniqueID or post.info.capcode
|
||||||
IDHighlight.uniqueID = if IDHighlight.uniqueID is uniqueID then null else uniqueID
|
IDHighlight.uniqueID = if IDHighlight.uniqueID is uniqueID then null else uniqueID
|
||||||
g.posts.forEach IDHighlight.set
|
g.posts.forEach IDHighlight.set
|
||||||
|
|
||||||
return IDHighlight
|
|
||||||
|
|||||||
@ -325,5 +325,3 @@ Keybinds =
|
|||||||
|
|
||||||
focus: (post) ->
|
focus: (post) ->
|
||||||
$.addClass post, 'highlight'
|
$.addClass post, 'highlight'
|
||||||
|
|
||||||
return Keybinds
|
|
||||||
|
|||||||
@ -77,5 +77,3 @@ Nav =
|
|||||||
d.body.style.marginBottom = null
|
d.body.style.marginBottom = null
|
||||||
delete Nav.haveExtra
|
delete Nav.haveExtra
|
||||||
$.off d, 'scroll', Nav.removeExtra
|
$.off d, 'scroll', Nav.removeExtra
|
||||||
|
|
||||||
return Nav
|
|
||||||
|
|||||||
@ -12,5 +12,3 @@ NormalizeURL =
|
|||||||
pathname = pathname.join '/'
|
pathname = pathname.join '/'
|
||||||
if location.pathname isnt pathname
|
if location.pathname isnt pathname
|
||||||
history.replaceState history.state, '', "#{location.protocol}//#{location.host}#{pathname}#{location.hash}"
|
history.replaceState history.state, '', "#{location.protocol}//#{location.host}#{pathname}#{location.hash}"
|
||||||
|
|
||||||
return NormalizeURL
|
|
||||||
|
|||||||
@ -54,5 +54,3 @@ PSAHiding =
|
|||||||
$.after $.id('globalToggle'), psa
|
$.after $.id('globalToggle'), psa
|
||||||
PSAHiding.hr?.hidden = PSAHiding.hidden
|
PSAHiding.hr?.hidden = PSAHiding.hidden
|
||||||
return
|
return
|
||||||
|
|
||||||
return PSAHiding
|
|
||||||
|
|||||||
@ -119,5 +119,3 @@ RelativeDates =
|
|||||||
return if data in RelativeDates.stale # We can call RelativeDates.update() multiple times.
|
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.
|
return if data instanceof Post and !g.posts[data.fullID] # collected post.
|
||||||
RelativeDates.stale.push data
|
RelativeDates.stale.push data
|
||||||
|
|
||||||
return RelativeDates
|
|
||||||
|
|||||||
@ -26,5 +26,3 @@ RemoveSpoilers =
|
|||||||
$.replace spoiler, span
|
$.replace spoiler, span
|
||||||
$.add span, [spoiler.childNodes...]
|
$.add span, [spoiler.childNodes...]
|
||||||
return
|
return
|
||||||
|
|
||||||
return RemoveSpoilers
|
|
||||||
|
|||||||
@ -65,5 +65,3 @@ Report =
|
|||||||
if types = $.id('reportTypes')
|
if types = $.id('reportTypes')
|
||||||
$.on types, 'change', (e) ->
|
$.on types, 'change', (e) ->
|
||||||
$('form').action = if e.target.value is 'illegal' then '#redirect' else ''
|
$('form').action = if e.target.value is 'illegal' then '#redirect' else ''
|
||||||
|
|
||||||
return Report
|
|
||||||
|
|||||||
@ -18,5 +18,3 @@ ThreadLinks =
|
|||||||
|
|
||||||
process: (link) ->
|
process: (link) ->
|
||||||
link.target = '_blank'
|
link.target = '_blank'
|
||||||
|
|
||||||
return ThreadLinks
|
|
||||||
|
|||||||
@ -62,5 +62,3 @@ Time =
|
|||||||
y: -> @getFullYear().toString()[2..]
|
y: -> @getFullYear().toString()[2..]
|
||||||
Y: -> @getFullYear()
|
Y: -> @getFullYear()
|
||||||
'%': -> '%'
|
'%': -> '%'
|
||||||
|
|
||||||
return Time
|
|
||||||
|
|||||||
@ -80,5 +80,3 @@ Favicon =
|
|||||||
|
|
||||||
dead: 'data:image/gif;base64,<%= readBase64('dead.gif') %>'
|
dead: 'data:image/gif;base64,<%= readBase64('dead.gif') %>'
|
||||||
logo: 'data:image/png;base64,<%= readBase64('/src/meta/icon128.png') %>'
|
logo: 'data:image/png;base64,<%= readBase64('/src/meta/icon128.png') %>'
|
||||||
|
|
||||||
return Favicon
|
|
||||||
|
|||||||
@ -40,5 +40,3 @@ MarkNewIPs =
|
|||||||
markOld: (post) ->
|
markOld: (post) ->
|
||||||
post.nodes.nameBlock.title = 'Not the first post from this IP.'
|
post.nodes.nameBlock.title = 'Not the first post from this IP.'
|
||||||
$.addClass post.nodes.root, 'old-ip'
|
$.addClass post.nodes.root, 'old-ip'
|
||||||
|
|
||||||
return MarkNewIPs
|
|
||||||
|
|||||||
@ -127,5 +127,3 @@ ReplyPruning =
|
|||||||
# Maintain position in thread when posts are added/removed above
|
# Maintain position in thread when posts are added/removed above
|
||||||
if hidden1 isnt hidden2 and (boardTop = Header.getTopOf $('.board')) < 0
|
if hidden1 isnt hidden2 and (boardTop = Header.getTopOf $('.board')) < 0
|
||||||
window.scrollBy 0, Math.max(d.body.clientHeight - oldPos, window.scrollY + boardTop) - window.scrollY
|
window.scrollBy 0, Math.max(d.body.clientHeight - oldPos, window.scrollY + boardTop) - window.scrollY
|
||||||
|
|
||||||
return ReplyPruning
|
|
||||||
|
|||||||
@ -6,5 +6,3 @@ ThreadExcerpt =
|
|||||||
name: 'Thread Excerpt'
|
name: 'Thread Excerpt'
|
||||||
cb: @node
|
cb: @node
|
||||||
node: -> d.title = Get.threadExcerpt @
|
node: -> d.title = Get.threadExcerpt @
|
||||||
|
|
||||||
return ThreadExcerpt
|
|
||||||
|
|||||||
@ -102,5 +102,3 @@ ThreadStats =
|
|||||||
if g.BOARD.ID isnt 'f' and ThreadStats.lastPost > ThreadStats.lastPageUpdate and ThreadStats.pageCountEl?.textContent isnt '1'
|
if g.BOARD.ID isnt 'f' and ThreadStats.lastPost > ThreadStats.lastPageUpdate and ThreadStats.pageCountEl?.textContent isnt '1'
|
||||||
clearTimeout ThreadStats.timeout
|
clearTimeout ThreadStats.timeout
|
||||||
ThreadStats.timeout = setTimeout ThreadStats.fetchPage, 5 * $.SECOND
|
ThreadStats.timeout = setTimeout ThreadStats.fetchPage, 5 * $.SECOND
|
||||||
|
|
||||||
return ThreadStats
|
|
||||||
|
|||||||
@ -360,5 +360,3 @@ ThreadUpdater =
|
|||||||
postCount: OP.replies + 1
|
postCount: OP.replies + 1
|
||||||
fileCount: OP.images + !!OP.fsize
|
fileCount: OP.images + !!OP.fsize
|
||||||
ipCount: OP.unique_ips
|
ipCount: OP.unique_ips
|
||||||
|
|
||||||
return ThreadUpdater
|
|
||||||
|
|||||||
@ -482,5 +482,3 @@ ThreadWatcher =
|
|||||||
$.on input, 'change', ThreadWatcher.refresh if name in ['Current Board', 'Show Unread Count']
|
$.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']
|
$.on input, 'change', ThreadWatcher.fetchAuto if name in ['Show Unread Count', 'Auto Update Thread Watcher']
|
||||||
entry
|
entry
|
||||||
|
|
||||||
return ThreadWatcher
|
|
||||||
|
|||||||
@ -252,5 +252,3 @@ Unread =
|
|||||||
Favicon[if isDead then 'dead' else 'default']
|
Favicon[if isDead then 'dead' else 'default']
|
||||||
# `favicon.href = href` doesn't work on Firefox.
|
# `favicon.href = href` doesn't work on Firefox.
|
||||||
$.add d.head, Favicon.el
|
$.add d.head, Favicon.el
|
||||||
|
|
||||||
return Unread
|
|
||||||
|
|||||||
@ -14,5 +14,3 @@ PassLink =
|
|||||||
Date.now()
|
Date.now()
|
||||||
'width=500,height=280,toolbar=0'
|
'width=500,height=280,toolbar=0'
|
||||||
$.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')]
|
$.before styleSelector.previousSibling, [passLink, $.tn('\u00A0\u00A0')]
|
||||||
|
|
||||||
return PassLink
|
|
||||||
|
|||||||
@ -16,5 +16,3 @@ PostSuccessful =
|
|||||||
threadID: threadID
|
threadID: threadID
|
||||||
postID: postID
|
postID: postID
|
||||||
val: true
|
val: true
|
||||||
|
|
||||||
return PostSuccessful
|
|
||||||
|
|||||||
@ -827,5 +827,3 @@ QR =
|
|||||||
QR.cooldown.auto = false
|
QR.cooldown.auto = false
|
||||||
QR.notifications.push new Notice 'info', 'QR upload aborted.', 5
|
QR.notifications.push new Notice 'info', 'QR upload aborted.', 5
|
||||||
QR.status()
|
QR.status()
|
||||||
|
|
||||||
return QR
|
|
||||||
|
|||||||
@ -58,5 +58,3 @@ QuoteBacklink =
|
|||||||
getContainer: (id) ->
|
getContainer: (id) ->
|
||||||
@containers[id] or=
|
@containers[id] or=
|
||||||
$.el 'span', className: 'container'
|
$.el 'span', className: 'container'
|
||||||
|
|
||||||
return QuoteBacklink
|
|
||||||
|
|||||||
@ -23,5 +23,3 @@ QuoteCT =
|
|||||||
if boardID is board.ID and threadID isnt thread.ID
|
if boardID is board.ID and threadID isnt thread.ID
|
||||||
$.add quotelink, $.tn QuoteCT.text
|
$.add quotelink, $.tn QuoteCT.text
|
||||||
return
|
return
|
||||||
|
|
||||||
return QuoteCT
|
|
||||||
|
|||||||
@ -110,5 +110,3 @@ QuoteInline =
|
|||||||
QuoteInline.rm inlined, boardID, threadID, postID, context
|
QuoteInline.rm inlined, boardID, threadID, postID, context
|
||||||
$.rmClass inlined, 'inlined'
|
$.rmClass inlined, 'inlined'
|
||||||
return
|
return
|
||||||
|
|
||||||
return QuoteInline
|
|
||||||
|
|||||||
@ -34,5 +34,3 @@ QuoteOP =
|
|||||||
if "#{boardID}.#{postID}" is fullID
|
if "#{boardID}.#{postID}" is fullID
|
||||||
$.add quotelink, $.tn QuoteOP.text
|
$.add quotelink, $.tn QuoteOP.text
|
||||||
return
|
return
|
||||||
|
|
||||||
return QuoteOP
|
|
||||||
|
|||||||
@ -53,5 +53,3 @@ QuotePreview =
|
|||||||
for post in [post].concat post.clones
|
for post in [post].concat post.clones
|
||||||
$.rmClass post.nodes.post, 'qphl'
|
$.rmClass post.nodes.post, 'qphl'
|
||||||
return
|
return
|
||||||
|
|
||||||
return QuotePreview
|
|
||||||
|
|||||||
@ -14,5 +14,3 @@ QuoteStrikeThrough =
|
|||||||
if g.posts["#{boardID}.#{postID}"]?.isHidden
|
if g.posts["#{boardID}.#{postID}"]?.isHidden
|
||||||
$.addClass quotelink, 'filtered'
|
$.addClass quotelink, 'filtered'
|
||||||
return
|
return
|
||||||
|
|
||||||
return QuoteStrikeThrough
|
|
||||||
|
|||||||
@ -146,5 +146,3 @@ QuoteThreading =
|
|||||||
Unread.setLine true
|
Unread.setLine true
|
||||||
Unread.read()
|
Unread.read()
|
||||||
Unread.update()
|
Unread.update()
|
||||||
|
|
||||||
return QuoteThreading
|
|
||||||
|
|||||||
@ -72,5 +72,3 @@ QuoteYou =
|
|||||||
Header.scrollTo post
|
Header.scrollTo post
|
||||||
$.addClass post, 'highlight'
|
$.addClass post, 'highlight'
|
||||||
return true
|
return true
|
||||||
|
|
||||||
return QuoteYou
|
|
||||||
|
|||||||
@ -99,5 +99,3 @@ Quotify =
|
|||||||
$.before deadlink, green
|
$.before deadlink, green
|
||||||
$.add green, deadlink
|
$.add green, deadlink
|
||||||
$.replace deadlink, [deadlink.childNodes...]
|
$.replace deadlink, [deadlink.childNodes...]
|
||||||
|
|
||||||
return Quotify
|
|
||||||
|
|||||||
@ -6,5 +6,3 @@ class Board
|
|||||||
@posts = new SimpleDict()
|
@posts = new SimpleDict()
|
||||||
|
|
||||||
g.boards[@] = @
|
g.boards[@] = @
|
||||||
|
|
||||||
return Board
|
|
||||||
|
|||||||
@ -22,5 +22,3 @@ class Callbacks
|
|||||||
html: node.nodes?.root?.outerHTML
|
html: node.nodes?.root?.outerHTML
|
||||||
|
|
||||||
Main.handleErrors errors if errors
|
Main.handleErrors errors if errors
|
||||||
|
|
||||||
return Callbacks
|
|
||||||
|
|||||||
@ -13,5 +13,3 @@ class CatalogThread
|
|||||||
pageCount: $ '.page-count', root
|
pageCount: $ '.page-count', root
|
||||||
comment: $ '.comment', root
|
comment: $ '.comment', root
|
||||||
@thread.catalogView = @
|
@thread.catalogView = @
|
||||||
|
|
||||||
return CatalogThread
|
|
||||||
|
|||||||
@ -20,5 +20,3 @@ class Connection
|
|||||||
for type, value of data
|
for type, value of data
|
||||||
@cb[type]? value
|
@cb[type]? value
|
||||||
return
|
return
|
||||||
|
|
||||||
return Connection
|
|
||||||
|
|||||||
@ -105,5 +105,3 @@ class DataBoard
|
|||||||
onSync: (data) =>
|
onSync: (data) =>
|
||||||
@data = data or boards: {}
|
@data = data or boards: {}
|
||||||
@sync?()
|
@sync?()
|
||||||
|
|
||||||
return DataBoard
|
|
||||||
|
|||||||
@ -220,5 +220,3 @@ class Fetcher
|
|||||||
'[/green]': <%= html('</span>') %>
|
'[/green]': <%= html('</span>') %>
|
||||||
'[blue]': <%= html('<span class="mu-b">') %>
|
'[blue]': <%= html('<span class="mu-b">') %>
|
||||||
'[/blue]': <%= html('</span>') %>
|
'[/blue]': <%= html('</span>') %>
|
||||||
|
|
||||||
return Fetcher
|
|
||||||
|
|||||||
@ -30,5 +30,3 @@ class Notice
|
|||||||
$.off d, 'visibilitychange', @add
|
$.off d, 'visibilitychange', @add
|
||||||
$.rm @el
|
$.rm @el
|
||||||
@onclose?()
|
@onclose?()
|
||||||
|
|
||||||
return Notice
|
|
||||||
|
|||||||
@ -249,5 +249,3 @@ class Post
|
|||||||
for clone in @clones[index..]
|
for clone in @clones[index..]
|
||||||
clone.nodes.root.dataset.clone = index++
|
clone.nodes.root.dataset.clone = index++
|
||||||
return
|
return
|
||||||
|
|
||||||
return Post
|
|
||||||
|
|||||||
@ -87,5 +87,3 @@ class RandomAccessList
|
|||||||
next.prev = prev
|
next.prev = prev
|
||||||
else
|
else
|
||||||
@last = prev
|
@last = prev
|
||||||
|
|
||||||
return RandomAccessList
|
|
||||||
|
|||||||
@ -14,5 +14,3 @@ class ShimSet
|
|||||||
@size--
|
@size--
|
||||||
|
|
||||||
window.Set = ShimSet unless 'Set' of window
|
window.Set = ShimSet unless 'Set' of window
|
||||||
|
|
||||||
return ShimSet
|
|
||||||
|
|||||||
@ -16,5 +16,3 @@ class SimpleDict
|
|||||||
forEach: (fn) ->
|
forEach: (fn) ->
|
||||||
fn @[key] for key in [@keys...]
|
fn @[key] for key in [@keys...]
|
||||||
return
|
return
|
||||||
|
|
||||||
return SimpleDict
|
|
||||||
|
|||||||
@ -76,5 +76,3 @@ class Thread
|
|||||||
@posts.forEach (post) -> post.collect()
|
@posts.forEach (post) -> post.collect()
|
||||||
g.threads.rm @fullID
|
g.threads.rm @fullID
|
||||||
@board.threads.rm @
|
@board.threads.rm @
|
||||||
|
|
||||||
return Thread
|
|
||||||
|
|||||||
@ -1040,5 +1040,3 @@ Config =
|
|||||||
'Max Replies': 1000
|
'Max Replies': 1000
|
||||||
|
|
||||||
'Autohiding Scrollbar': false
|
'Autohiding Scrollbar': false
|
||||||
|
|
||||||
return Config
|
|
||||||
|
|||||||
@ -500,5 +500,3 @@ Main =
|
|||||||
['Build Test', Build.Test]
|
['Build Test', Build.Test]
|
||||||
<% } %>
|
<% } %>
|
||||||
]
|
]
|
||||||
|
|
||||||
return Main
|
|
||||||
|
|||||||
@ -1,4 +1,2 @@
|
|||||||
$$ = (selector, root=d.body) ->
|
$$ = (selector, root=d.body) ->
|
||||||
[root.querySelectorAll(selector)...]
|
[root.querySelectorAll(selector)...]
|
||||||
|
|
||||||
return $$
|
|
||||||
|
|||||||
@ -596,5 +596,3 @@ $.clear = (cb) ->
|
|||||||
$.delete $.listValues().map (key) -> key.replace g.NAMESPACE, ''
|
$.delete $.listValues().map (key) -> key.replace g.NAMESPACE, ''
|
||||||
cb?()
|
cb?()
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
return $
|
|
||||||
|
|||||||
@ -126,5 +126,3 @@ CrossOrigin =
|
|||||||
delete callbacks[url]
|
delete callbacks[url]
|
||||||
responses[url] = response
|
responses[url] = response
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
return CrossOrigin
|
|
||||||
|
|||||||
@ -10,8 +10,12 @@ for (var name of process.argv.slice(2)) {
|
|||||||
script = script.replace(/\r\n/g, '\n');
|
script = script.replace(/\r\n/g, '\n');
|
||||||
script = template(script, {type: parts[2]}, sourceName);
|
script = template(script, {type: parts[2]}, sourceName);
|
||||||
if (parts[4] === 'coffee') {
|
if (parts[4] === 'coffee') {
|
||||||
|
var definesVar = /^[$A-Z][$\w]*$/.test(parts[3]);
|
||||||
|
if (definesVar) {
|
||||||
|
script = `${script}\nreturn ${parts[3]};\n`;
|
||||||
|
}
|
||||||
script = coffee.compile(script);
|
script = coffee.compile(script);
|
||||||
if (/^[$A-Z][$\w]*$/.test(parts[3])) {
|
if (definesVar) {
|
||||||
script = `${parts[3]} = ${script}`;
|
script = `${parts[3]} = ${script}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user