Custom CSS should always be added after main CSS.
Also fix issue with "undefined" IDs.
This commit is contained in:
parent
29d7e35840
commit
ea3c4d9bc6
@ -90,7 +90,7 @@ Main =
|
||||
$.addClass doc, 'fourchan-x', 'seaweedchan'
|
||||
$.addClass doc, if g.VIEW is 'thread' then 'thread-view' else g.VIEW
|
||||
$.addClass doc, if chrome? then 'blink' else 'gecko'
|
||||
$.addStyle Main.css
|
||||
$.addStyle Main.css, 'fourchanx-css'
|
||||
|
||||
Main.setClass()
|
||||
|
||||
|
||||
@ -3,7 +3,8 @@ CustomCSS =
|
||||
return unless Conf['Custom CSS']
|
||||
@addStyle()
|
||||
addStyle: ->
|
||||
@style = $.addStyle Conf['usercss']
|
||||
$.asap (-> $.id 'fourchanx-css'), =>
|
||||
@style = $.addStyle Conf['usercss'], 'custom-css'
|
||||
rmStyle: ->
|
||||
if @style
|
||||
$.rm @style
|
||||
@ -11,4 +12,4 @@ CustomCSS =
|
||||
update: ->
|
||||
unless @style
|
||||
@addStyle()
|
||||
@style.textContent = Conf['usercss']
|
||||
@style.textContent = Conf['usercss']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user