diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1d6dcd0c3..b797c7a69 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -8359,13 +8359,14 @@ cb: this.node }); }, - node: function(post) { - var str, _ref; + node: function() { + var str, uid; - if (((_ref = $('.hand', this.nodes.uniqueID)) != null ? _ref.nodeName : void 0) !== 'SPAN') { + str = this.info.uniqueID; + uid = $('.hand', this.nodes.uniqueID); + if (!(str && uid && uid.nodeName === 'SPAN')) { return; } - str = this.info.uniqueID; return uid.style.cssText = IDColor.css(IDColor.ids[str] || IDColor.compute(str)); }, ids: {}, diff --git a/builds/crx/script.js b/builds/crx/script.js index 016dac3df..fdae8541e 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -8345,13 +8345,14 @@ cb: this.node }); }, - node: function(post) { - var str, _ref; + node: function() { + var str, uid; - if (((_ref = $('.hand', this.nodes.uniqueID)) != null ? _ref.nodeName : void 0) !== 'SPAN') { + str = this.info.uniqueID; + uid = $('.hand', this.nodes.uniqueID); + if (!(str && uid && uid.nodeName === 'SPAN')) { return; } - str = this.info.uniqueID; return uid.style.cssText = IDColor.css(IDColor.ids[str] || IDColor.compute(str)); }, ids: {}, diff --git a/src/Miscellaneous/ColorUserIDs.coffee b/src/Miscellaneous/ColorUserIDs.coffee index b4b72e7dc..a0b442a17 100644 --- a/src/Miscellaneous/ColorUserIDs.coffee +++ b/src/Miscellaneous/ColorUserIDs.coffee @@ -6,9 +6,10 @@ IDColor = name: 'Color User IDs' cb: @node - node: (post) -> - return unless $('.hand', @nodes.uniqueID)?.nodeName is 'SPAN' + node: -> str = @info.uniqueID + uid = $ '.hand', @nodes.uniqueID + return unless str and uid and uid.nodeName is 'SPAN' uid.style.cssText = IDColor.css IDColor.ids[str] or IDColor.compute str ids: {}