diff --git a/builds/4chan-X.js b/builds/4chan-X.js index c106c9b98..e8162ded9 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -113,8 +113,7 @@ __slice = [].slice, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Config = { main: { @@ -8127,12 +8126,12 @@ hiddenPSAs: null }; $.get(items, function(_arg) { - var hiddenPSA, hiddenPSAs, _ref; + var hiddenPSA, hiddenPSAs; hiddenPSA = _arg.hiddenPSA, hiddenPSAs = _arg.hiddenPSAs; if (hiddenPSAs) { $["delete"]('hiddenPSAs'); - if (_ref = psa.textContent.replace(/\W+/g, '').toLowerCase(), __indexOf.call(hiddenPSAs, _ref) >= 0) { + if (hiddenPSAs.contains(psa.textContent.replace(/\W+/g, '').toLowerCase())) { hiddenPSA = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', hiddenPSA); } diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 8e2b5a67a..3cffc2a21 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -113,8 +113,7 @@ __slice = [].slice, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Config = { main: { @@ -8121,12 +8120,12 @@ hiddenPSAs: null }; $.get(items, function(_arg) { - var hiddenPSA, hiddenPSAs, _ref; + var hiddenPSA, hiddenPSAs; hiddenPSA = _arg.hiddenPSA, hiddenPSAs = _arg.hiddenPSAs; if (hiddenPSAs) { $["delete"]('hiddenPSAs'); - if (_ref = psa.textContent.replace(/\W+/g, '').toLowerCase(), __indexOf.call(hiddenPSAs, _ref) >= 0) { + if (hiddenPSAs.contains(psa.textContent.replace(/\W+/g, '').toLowerCase())) { hiddenPSA = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', hiddenPSA); } diff --git a/builds/crx/script.js b/builds/crx/script.js index d8a3b0c65..986d47dbf 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -8104,12 +8104,12 @@ hiddenPSAs: null }; $.get(items, function(_arg) { - var hiddenPSA, hiddenPSAs, _ref; + var hiddenPSA, hiddenPSAs; hiddenPSA = _arg.hiddenPSA, hiddenPSAs = _arg.hiddenPSAs; if (hiddenPSAs) { $["delete"]('hiddenPSAs'); - if (_ref = psa.textContent.replace(/\W+/g, '').toLowerCase(), __indexOf.call(hiddenPSAs, _ref) >= 0) { + if (hiddenPSAs.contains(psa.textContent.replace(/\W+/g, '').toLowerCase())) { hiddenPSA = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', hiddenPSA); } diff --git a/src/Miscellaneous/AnnouncementHiding.coffee b/src/Miscellaneous/AnnouncementHiding.coffee index 13ae4331d..81dd3954e 100644 --- a/src/Miscellaneous/AnnouncementHiding.coffee +++ b/src/Miscellaneous/AnnouncementHiding.coffee @@ -38,7 +38,7 @@ PSAHiding = $.get items, ({hiddenPSA, hiddenPSAs}) -> if hiddenPSAs $.delete 'hiddenPSAs' - if psa.textContent.replace(/\W+/g, '').toLowerCase() in hiddenPSAs + if hiddenPSAs.contains psa.textContent.replace(/\W+/g, '').toLowerCase() hiddenPSA = +$.id('globalMessage').dataset.utc $.set 'hiddenPSA', hiddenPSA PSAHiding.sync hiddenPSA