@@ -853,7 +853,7 @@ options =
textContent: key
hidingul = ul if key is 'Hiding'
for key, arr of obj
- checked = if $.config key then "checked" else ""
+ checked = if conf[key] then "checked" else ""
description = arr[1]
li = $.el 'li',
innerHTML: ": #{description}"
@@ -1003,11 +1003,11 @@ qr =
return
if qr.el
- if g.REPLY and $.config 'Persistent QR'
+ if g.REPLY and conf['Persistent QR']
qr.refresh()
else
qr.close()
- if $.config 'Cooldown'
+ if conf['Cooldown']
duration = if qr.sage then 60 else 30
$.setValue g.BOARD+'/cooldown', Date.now() + duration * 1000
cooldown.start()
@@ -1021,7 +1021,7 @@ qr =
qr.quote @
submit: (e) ->
- if $.config('Auto Watch Reply') and $.config('Thread Watcher')
+ if conf['Auto Watch Reply'] and conf['Thread Watcher']
if g.REPLY and $('img.favicon').src is Favicon.empty
watcher.watch null, g.THREAD_ID
else
@@ -1230,7 +1230,7 @@ threadHiding =
$.setValue "hiddenThreads/#{g.BOARD}/", hiddenThreads
hideHide: (thread) ->
- if $.config 'Show Stubs'
+ if conf['Show Stubs']
if span = $ '.omittedposts', thread
num = Number span.textContent.match(/\d+/)[0]
else
@@ -1268,18 +1268,18 @@ threadHiding =
updater =
init: ->
- updater.interval = $.config 'Interval'
- updater.ircUpd = $.config 'IRC Updating'
- updater.verbose = $.config 'Verbose'
+ updater.interval = conf['Interval']
+ updater.ircUpd = conf['IRC Updating']
+ updater.verbose = conf['Verbose']
html = "
-#{updater.interval}
"
conf = config.updater.checkbox
for name of conf
title = conf[name][1]
- checked = if $.config name then 'checked' else ''
+ checked = if conf[name] then 'checked' else ''
html += ""
- checked = if $.config 'Auto Update' then 'checked' else ''
+ checked = if conf['Auto Update'] then 'checked' else ''
html += "
@@ -1476,7 +1476,7 @@ anonymize =
sauce =
init: ->
- sauce.prefixes = (s for s in ($.config('flavors').split '\n') when s[0] != '#')
+ sauce.prefixes = (s for s in (conf['flavors'].split '\n') when s[0] != '#')
sauce.names = (prefix.match(/(\w+)\./)[1] for prefix in sauce.prefixes)
g.callbacks.push (root) ->
return if root.className is 'inline'
@@ -1516,7 +1516,7 @@ Time =
textContent: ' ' + Time.funk(Time) + ' '
$.replace s, time
foo: ->
- code = $.config('time').replace /%([A-Za-z])/g, (s, c) ->
+ code = conf['time'].replace /%([A-Za-z])/g, (s, c) ->
switch c
when 'a', 'A', 'b', 'B', 'd', 'H', 'I', 'm', 'M', 'p', 'P', 'y' then "' + Time.#{c}() + '"
else s
@@ -1565,9 +1565,9 @@ titlePost =
quoteBacklink =
init: ->
- quoteBacklink.opbl = ! $.config 'OP Backlinks'
- quoteBacklink.qp = $.config 'Quote Preview'
- quoteBacklink.qi = $.config 'Quote Inline'
+ quoteBacklink.opbl = ! conf['OP Backlinks']
+ quoteBacklink.qp = conf['Quote Preview']
+ quoteBacklink.qi = conf['Quote Inline']
g.callbacks.push (root) ->
return if /inline/.test root.className
# op or reply
@@ -1664,7 +1664,7 @@ quoteInline =
quotePreview =
init: ->
- quotePreview.hl = $.config 'Quote Highlighting'
+ quotePreview.hl = conf['Quote Highlighting']
g.callbacks.push (root) ->
for quote in $$ 'a.quotelink, a.backlink', root
continue unless quote.hash
@@ -2062,7 +2062,7 @@ main =
if location.hostname is 'sys.4chan.org'
qr.sys()
return
- if $.config('404 Redirect') and d.title is '4chan - 404' and /^\d+$/.test g.THREAD_ID
+ if conf['404 Redirect'] and d.title is '4chan - 404' and /^\d+$/.test g.THREAD_ID
redirect()
return
if not $ '#navtopr'
@@ -2104,100 +2104,100 @@ main =
#major features
threading.init()
- if $.config 'Auto Noko'
+ if conf['Auto Noko']
$('.postarea form').action += '?auto_noko'
- if $.config 'Cooldown'
+ if conf['Cooldown']
cooldown.init()
- if $.config 'Image Expansion'
+ if conf['Image Expansion']
imgExpand.init()
- if $.config 'Image Auto-Gif'
+ if conf['Image Auto-Gif']
imgGif.init()
- if $.config 'Time Formatting'
+ if conf['Time Formatting']
Time.init()
- if $.config 'Sauce'
+ if conf['Sauce']
sauce.init()
- if $.config 'Reveal Spoilers'
+ if conf['Reveal Spoilers']
revealSpoilers.init()
- if $.config 'Anonymize'
+ if conf['Anonymize']
anonymize.init()
- if $.config 'Image Hover'
+ if conf['Image Hover']
imgHover.init()
- if $.config 'Reply Hiding'
+ if conf['Reply Hiding']
replyHiding.init()
- if canPost and $.config 'Quick Reply'
+ if canPost and conf['Quick Reply']
qr.init()
- if $.config 'Report Button'
+ if conf['Report Button']
reportButton.init()
- if $.config 'Quote Backlinks'
+ if conf['Quote Backlinks']
quoteBacklink.init()
- if $.config 'Quote Inline'
+ if conf['Quote Inline']
quoteInline.init()
- if $.config 'Quote Preview'
+ if conf['Quote Preview']
quotePreview.init()
- if $.config 'Indicate OP quote'
+ if conf['Indicate OP quote']
quoteOP.init()
- if $.config 'Thread Watcher'
+ if conf['Thread Watcher']
watcher.init()
- if $.config 'Keybinds'
+ if conf['Keybinds']
keybinds.init()
if g.REPLY
- if $.config 'Thread Updater'
+ if conf['Thread Updater']
updater.init()
- if $.config 'Image Preloading'
+ if conf['Image Preloading']
imgPreloading.init()
- if $.config('Quick Reply') and $.config 'Persistent QR'
+ if conf['Quick Reply'] and conf['Persistent QR']
qr.persist()
- if $.config 'Post in Title'
+ if conf['Post in Title']
titlePost.init()
- if $.config 'Thread Stats'
+ if conf['Thread Stats']
threadStats.init()
- if $.config 'Unread Count'
+ if conf['Unread Count']
unread.init()
- if $.config 'Reply Navigation'
+ if conf['Reply Navigation']
nav.init()
- if $.config('Auto Watch') and $.config('Thread Watcher') and
+ if conf['Auto Watch'] and conf['Thread Watcher'] and
location.hash is '#watch' and $('img.favicon').src is Favicon.empty
watcher.watch null, g.THREAD_ID
else #not reply
- if $.config 'Index Navigation'
+ if conf['Index Navigation']
nav.init()
- if $.config 'Thread Hiding'
+ if conf['Thread Hiding']
threadHiding.init()
- if $.config 'Thread Expansion'
+ if conf['Thread Expansion']
expandThread.init()
- if $.config 'Comment Expansion'
+ if conf['Comment Expansion']
expandComment.init()
- if $.config('Auto Watch')
+ if conf['Auto Watch']
$('.postarea form').action += '?auto_watch'
for op in $$ 'div.op'