diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index b95a2ab15..055d303ea 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -984,33 +984,30 @@ }; Post.prototype.parseQuotes = function() { - var hash, pathname, quotelink, quotes, _i, _len, _ref; + var quotelink, _i, _len, _ref; - quotes = {}; + this.quotes = []; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { quotelink = _ref[_i]; - hash = quotelink.hash; - if (!hash) { - continue; - } - pathname = quotelink.pathname; - if (/catalog$/.test(pathname)) { - continue; - } - if (quotelink.hostname !== 'boards.4chan.org') { - continue; - } - this.nodes.quotelinks.push(quotelink); - if (!this.isReply && $.hasClass(quotelink.parentNode.parentNode, 'capcodeReplies')) { - continue; - } - quotes["" + (pathname.split('/')[1]) + "." + hash.slice(2)] = true; + this.parseQuote(quotelink); } - if (this.isClone) { + }; + + Post.prototype.parseQuote = function(quotelink) { + var fullID, match; + + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/res\/\d+#p(\d+)$/))) { return; } - return this.quotes = Object.keys(quotes); + this.nodes.quotelinks.push(quotelink); + if (this.isClone || !this.isReply && $.hasClass(quotelink.parentNode.parentNode, 'capcodeReplies')) { + return; + } + fullID = "" + match[1] + "." + match[2]; + if (this.quotes.indexOf(fullID) === -1) { + return this.quotes.push(fullID); + } }; Post.prototype.parseFile = function(that) { diff --git a/builds/crx/script.js b/builds/crx/script.js index b84693fc8..16b927adf 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -990,33 +990,30 @@ }; Post.prototype.parseQuotes = function() { - var hash, pathname, quotelink, quotes, _i, _len, _ref; + var quotelink, _i, _len, _ref; - quotes = {}; + this.quotes = []; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { quotelink = _ref[_i]; - hash = quotelink.hash; - if (!hash) { - continue; - } - pathname = quotelink.pathname; - if (/catalog$/.test(pathname)) { - continue; - } - if (quotelink.hostname !== 'boards.4chan.org') { - continue; - } - this.nodes.quotelinks.push(quotelink); - if (!this.isReply && $.hasClass(quotelink.parentNode.parentNode, 'capcodeReplies')) { - continue; - } - quotes["" + (pathname.split('/')[1]) + "." + hash.slice(2)] = true; + this.parseQuote(quotelink); } - if (this.isClone) { + }; + + Post.prototype.parseQuote = function(quotelink) { + var fullID, match; + + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/res\/\d+#p(\d+)$/))) { return; } - return this.quotes = Object.keys(quotes); + this.nodes.quotelinks.push(quotelink); + if (this.isClone || !this.isReply && $.hasClass(quotelink.parentNode.parentNode, 'capcodeReplies')) { + return; + } + fullID = "" + match[1] + "." + match[2]; + if (this.quotes.indexOf(fullID) === -1) { + return this.quotes.push(fullID); + } }; Post.prototype.parseFile = function(that) { diff --git a/html/Monitoring/ThreadStats.html b/html/Monitoring/ThreadStats.html deleted file mode 100644 index f6d932e43..000000000 --- a/html/Monitoring/ThreadStats.html +++ /dev/null @@ -1,3 +0,0 @@ -