Small CustomCSS optimization

This commit is contained in:
Zixaphir 2014-02-23 08:33:31 -07:00
parent 8fa130c2df
commit 58a3adeedb
3 changed files with 6 additions and 3 deletions

View File

@ -10776,7 +10776,7 @@
},
update: function() {
if (!this.style) {
this.addStyle();
return this.addStyle();
}
return this.style.textContent = Conf['usercss'];
}

View File

@ -10773,7 +10773,7 @@
},
update: function() {
if (!this.style) {
this.addStyle();
return this.addStyle();
}
return this.style.textContent = Conf['usercss'];
}

View File

@ -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']