Small CustomCSS optimization
This commit is contained in:
parent
8fa130c2df
commit
58a3adeedb
@ -10776,7 +10776,7 @@
|
||||
},
|
||||
update: function() {
|
||||
if (!this.style) {
|
||||
this.addStyle();
|
||||
return this.addStyle();
|
||||
}
|
||||
return this.style.textContent = Conf['usercss'];
|
||||
}
|
||||
|
||||
@ -10773,7 +10773,7 @@
|
||||
},
|
||||
update: function() {
|
||||
if (!this.style) {
|
||||
this.addStyle();
|
||||
return this.addStyle();
|
||||
}
|
||||
return this.style.textContent = Conf['usercss'];
|
||||
}
|
||||
|
||||
@ -2,13 +2,16 @@ CustomCSS =
|
||||
init: ->
|
||||
return unless Conf['Custom CSS']
|
||||
@addStyle()
|
||||
|
||||
addStyle: ->
|
||||
@style = $.addStyle Conf['usercss']
|
||||
|
||||
rmStyle: ->
|
||||
if @style
|
||||
$.rm @style
|
||||
delete @style
|
||||
|
||||
update: ->
|
||||
unless @style
|
||||
@addStyle()
|
||||
return @addStyle()
|
||||
@style.textContent = Conf['usercss']
|
||||
Loading…
x
Reference in New Issue
Block a user