Somewhat more moot-proof header.

This commit is contained in:
Nicolas Stepien 2012-09-06 02:17:14 +02:00
parent c2c3a65f99
commit 1afdb1aed5
2 changed files with 25 additions and 31 deletions

View File

@ -907,17 +907,13 @@
className: 'reply',
innerHTML: '<div class=extra></div>'
});
localStorage.setItem('4chan_settings', false);
return $.ready(Main.initHeaderReady);
},
initHeaderReady: function() {
var header, nav, settings, _ref, _ref1, _ref2;
if (!$.id('navtopright')) {
return;
}
header = Main.header;
$.prepend(d.body, header);
nav = $.id('boardNavDesktop');
if (nav = $.id('boardNavDesktop')) {
header.id = nav.id;
$.prepend(header, nav);
nav.id = nav.className = null;
@ -931,6 +927,7 @@
if ((_ref = $("a[href$='/" + g.BOARD + "/']", nav)) != null) {
_ref.className = 'current';
}
}
$.addClass(d.body, $.engine);
$.addClass(d.body, 'fourchan_x');
if ((_ref1 = $('link[href*=mobile]', d.head)) != null) {

View File

@ -711,15 +711,12 @@ Main =
Main.header = $.el 'div',
className: 'reply'
innerHTML: '<div class=extra></div>'
# disable 4chan's features
localStorage.setItem '4chan_settings', false
$.ready Main.initHeaderReady
initHeaderReady: ->
return unless $.id 'navtopright'
header = Main.header
$.prepend d.body, header
nav = $.id 'boardNavDesktop'
if nav = $.id 'boardNavDesktop'
header.id = nav.id
$.prepend header, nav
nav.id = nav.className = null