Actually, let's keep listening to 4chanMainInit, it guarantees that we don't get FOUC'd on the index/in
threads.
This commit is contained in:
parent
f072e68f6e
commit
ebfa224fe3
@ -18,6 +18,7 @@ Main =
|
|||||||
Conf['archives'] = Redirect.archives
|
Conf['archives'] = Redirect.archives
|
||||||
$.get Conf, Main.initFeatures
|
$.get Conf, Main.initFeatures
|
||||||
|
|
||||||
|
$.on d, '4chanMainInit', Main.initStyle
|
||||||
$.asap (-> d.head and $('link[rel="shortcut icon"]', d.head) or d.readyState in ['interactive', 'complete']),
|
$.asap (-> d.head and $('link[rel="shortcut icon"]', d.head) or d.readyState in ['interactive', 'complete']),
|
||||||
Main.initStyle
|
Main.initStyle
|
||||||
|
|
||||||
@ -119,7 +120,8 @@ Main =
|
|||||||
$.ready Main.initReady
|
$.ready Main.initReady
|
||||||
|
|
||||||
initStyle: ->
|
initStyle: ->
|
||||||
return unless Main.isThisPageLegit()
|
$.off d, '4chanMainInit', Main.initStyle
|
||||||
|
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
|
||||||
<% if (type === 'crx') { %>
|
<% if (type === 'crx') { %>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user