Move www.4chan.org init code to a more normal place.
This commit is contained in:
parent
5d90cf0f28
commit
c54cf1fe0e
@ -11,14 +11,6 @@ Main =
|
|||||||
$.ready -> Captcha.fixes.init()
|
$.ready -> Captcha.fixes.init()
|
||||||
return
|
return
|
||||||
|
|
||||||
if location.hostname is 'www.4chan.org'
|
|
||||||
$.onExists d.documentElement, 'body', false, -> $.addStyle Main.cssWWW
|
|
||||||
Conf = {'captchaLanguage': Config.captchaLanguage}
|
|
||||||
$.get Conf, (items) ->
|
|
||||||
$.extend Conf, items
|
|
||||||
Captcha.language.fixPage()
|
|
||||||
return
|
|
||||||
|
|
||||||
g.threads = new SimpleDict()
|
g.threads = new SimpleDict()
|
||||||
g.posts = new SimpleDict()
|
g.posts = new SimpleDict()
|
||||||
|
|
||||||
@ -71,6 +63,9 @@ Main =
|
|||||||
$.globalEval 'document.documentElement.classList.add("js-enabled");'
|
$.globalEval 'document.documentElement.classList.add("js-enabled");'
|
||||||
|
|
||||||
switch location.hostname
|
switch location.hostname
|
||||||
|
when 'www.4chan.org'
|
||||||
|
Captcha.language.fixPage()
|
||||||
|
return
|
||||||
when 'a.4cdn.org'
|
when 'a.4cdn.org'
|
||||||
return
|
return
|
||||||
when 'sys.4chan.org'
|
when 'sys.4chan.org'
|
||||||
@ -119,7 +114,10 @@ Main =
|
|||||||
$.ready Main.initReady
|
$.ready Main.initReady
|
||||||
|
|
||||||
initStyle: ->
|
initStyle: ->
|
||||||
|
$.addStyle Main.cssWWW if location.hostname is 'www.4chan.org'
|
||||||
|
|
||||||
return if !Main.isThisPageLegit() or $.hasClass doc, 'fourchan-x'
|
return if !Main.isThisPageLegit() or $.hasClass doc, 'fourchan-x'
|
||||||
|
|
||||||
# disable the mobile layout
|
# disable the mobile layout
|
||||||
$('link[href*=mobile]', d.head)?.disabled = true
|
$('link[href*=mobile]', d.head)?.disabled = true
|
||||||
$.addClass doc, 'fourchan-x', 'seaweedchan'
|
$.addClass doc, 'fourchan-x', 'seaweedchan'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user