Add initial CSS.

This commit is contained in:
Nicolas Stepien 2012-08-27 03:54:13 +02:00
parent 6b2dd53cd1
commit e4eb6b2d7c
2 changed files with 35 additions and 1 deletions

View File

@ -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();

View File

@ -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()