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:
Mayhem 2013-05-12 23:56:50 +02:00
parent f072e68f6e
commit ebfa224fe3

View File

@ -18,6 +18,7 @@ Main =
Conf['archives'] = Redirect.archives
$.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']),
Main.initStyle
@ -119,7 +120,8 @@ Main =
$.ready Main.initReady
initStyle: ->
return unless Main.isThisPageLegit()
$.off d, '4chanMainInit', Main.initStyle
return if !Main.isThisPageLegit() or $.hasClass doc, 'fourchan-x'
# disable the mobile layout
$('link[href*=mobile]', d.head)?.disabled = true
<% if (type === 'crx') { %>