diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9615fc049..33133ff35 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -10776,7 +10776,7 @@ }, update: function() { if (!this.style) { - this.addStyle(); + return this.addStyle(); } return this.style.textContent = Conf['usercss']; } diff --git a/builds/crx/script.js b/builds/crx/script.js index f6bac2241..39c9da9a0 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10773,7 +10773,7 @@ }, update: function() { if (!this.style) { - this.addStyle(); + return this.addStyle(); } return this.style.textContent = Conf['usercss']; } diff --git a/src/Miscellaneous/CustomCSS.coffee b/src/Miscellaneous/CustomCSS.coffee index a990ed7bd..f36b20200 100755 --- a/src/Miscellaneous/CustomCSS.coffee +++ b/src/Miscellaneous/CustomCSS.coffee @@ -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'] \ No newline at end of file