From 1b890399776b1afc94f44bb82ff218c8044fea95 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 6 Aug 2013 17:17:34 -0700 Subject: [PATCH] I hate this. --- builds/4chan-X.user.js | 7 +++---- builds/crx/script.js | 4 ++-- src/Monitoring/Unread.coffee | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1f7c82496..dc1509a81 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -115,8 +115,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: { @@ -7898,7 +7897,7 @@ return Unread.update(); }, addPosts: function(posts) { - var ID, data, post, _i, _len, _ref; + var ID, data, post, _i, _len; for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; @@ -7920,7 +7919,7 @@ Unread.addPostQuotingYou(post); } if (Conf['Unread Line']) { - Unread.setLine((_ref = Unread.posts[0], __indexOf.call(posts, _ref) >= 0)); + Unread.setLine(posts.contains(Unread.posts[0])); } Unread.read(); return Unread.update(); diff --git a/builds/crx/script.js b/builds/crx/script.js index 0ec4ddd6f..38cada217 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -7878,7 +7878,7 @@ return Unread.update(); }, addPosts: function(posts) { - var ID, data, post, _i, _len, _ref; + var ID, data, post, _i, _len; for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; @@ -7900,7 +7900,7 @@ Unread.addPostQuotingYou(post); } if (Conf['Unread Line']) { - Unread.setLine((_ref = Unread.posts[0], __indexOf.call(posts, _ref) >= 0)); + Unread.setLine(posts.contains(Unread.posts[0])); } Unread.read(); return Unread.update(); diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 8263c835a..5ae97a370 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -84,7 +84,7 @@ Unread = Unread.addPostQuotingYou post if Conf['Unread Line'] # Force line on visible threads if there were no unread posts previously. - Unread.setLine Unread.posts[0] in posts + Unread.setLine posts.contains Unread.posts[0] Unread.read() Unread.update()