Add initial CSS.
This commit is contained in:
parent
6b2dd53cd1
commit
e4eb6b2d7c
@ -669,6 +669,7 @@
|
||||
if (g.REPLY = pathname[2] === 'res') {
|
||||
g.THREAD = +pathname[3];
|
||||
}
|
||||
Main.addStyle();
|
||||
return $.ready(Main.ready);
|
||||
},
|
||||
ready: function() {
|
||||
@ -689,7 +690,23 @@
|
||||
}
|
||||
}
|
||||
return $.log(g);
|
||||
}
|
||||
},
|
||||
addStyle: function() {
|
||||
$.off(d, 'DOMNodeInserted', Main.addStyle);
|
||||
if (d.head) {
|
||||
return $.addStyle(Main.css);
|
||||
} else {
|
||||
return $.on(d, 'DOMNodeInserted', Main.addStyle);
|
||||
}
|
||||
},
|
||||
css: '\
|
||||
.move {\
|
||||
cursor: move;\
|
||||
}\
|
||||
label {\
|
||||
cursor: pointer;\
|
||||
}\
|
||||
'
|
||||
};
|
||||
|
||||
Main.init();
|
||||
|
||||
@ -516,6 +516,8 @@ Main =
|
||||
if g.REPLY = pathname[2] is 'res'
|
||||
g.THREAD = +pathname[3]
|
||||
|
||||
Main.addStyle()
|
||||
|
||||
$.ready Main.ready
|
||||
ready: ->
|
||||
board = $ '.board'
|
||||
@ -526,5 +528,20 @@ Main =
|
||||
if $.hasClass child, 'postContainer'
|
||||
new Post child, thread, g.BOARD
|
||||
$.log g
|
||||
addStyle: ->
|
||||
$.off d, 'DOMNodeInserted', Main.addStyle
|
||||
if d.head
|
||||
$.addStyle Main.css
|
||||
else
|
||||
$.on d, 'DOMNodeInserted', Main.addStyle
|
||||
|
||||
css: '
|
||||
.move {
|
||||
cursor: move;
|
||||
}
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
'
|
||||
|
||||
Main.init()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user