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