diff --git a/CHANGELOG.md b/CHANGELOG.md index 255565ce1..37a49b57e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x). +### v1.10.14 + +**v1.10.14.0** *(2015-06-07)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.14.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.14.0/builds/4chan-X-noupdate.crx "Chromium version")] +- Based on v1.10.13.4. +- Fix board-specific filters in thread watcher (filters apply to unread posts quoting you). + ### v1.10.13 **v1.10.13.4** *(2015-06-05)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.13.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.13.4/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 7c34f309b..4b3cfd883 100644 Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js index 318fb7476..8f68f2715 100644 --- a/builds/4chan-X-beta.meta.js +++ b/builds/4chan-X-beta.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.10.13.4 +// @version 1.10.14.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index e81d530ad..a115d9257 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.10.13.4 +// @version 1.10.14.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -396,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.13.4', + VERSION: '1.10.14.0', NAMESPACE: '4chan X.', boards: {} }; @@ -5012,7 +5012,7 @@ Filter = { filters: {}, init: function() { - var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, ref6, regexp, stub, top; + var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, regexp, stub, top; if (!(((ref = g.VIEW) === 'index' || ref === 'thread') && Conf['Filter'])) { return; } @@ -5032,9 +5032,7 @@ } filter = line.replace(regexp[0], ''); boards = ((ref2 = filter.match(/boards:([^;]+)/)) != null ? ref2[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (ref3 = g.BOARD.ID, indexOf.call(boards.split(','), ref3) < 0)) { - continue; - } + boards = boards === 'global' ? null : boards.split(','); if (key === 'uniqueID' || key === 'MD5') { regexp = regexp[1]; } else { @@ -5046,10 +5044,10 @@ continue; } } - op = ((ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref4[1] : void 0) || 'yes'; + op = ((ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref3[1] : void 0) || 'yes'; stub = (function() { - var ref5; - switch ((ref5 = filter.match(/stub:(yes|no)/)) != null ? ref5[1] : void 0) { + var ref4; + switch ((ref4 = filter.match(/stub:(yes|no)/)) != null ? ref4[1] : void 0) { case 'yes': return true; case 'no': @@ -5059,11 +5057,11 @@ } })(); if (hl = /highlight/.test(filter)) { - hl = ((ref5 = filter.match(/highlight:([\w-]+)/)) != null ? ref5[1] : void 0) || 'filter-highlight'; - top = ((ref6 = filter.match(/top:(yes|no)/)) != null ? ref6[1] : void 0) || 'yes'; + hl = ((ref4 = filter.match(/highlight:([\w-]+)/)) != null ? ref4[1] : void 0) || 'filter-highlight'; + top = ((ref5 = filter.match(/top:(yes|no)/)) != null ? ref5[1] : void 0) || 'yes'; top = top === 'yes'; } - this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); + this.filters[key].push(this.createFilter(regexp, boards, op, stub, hl, top)); } if (!this.filters[key].length) { delete this.filters[key]; @@ -5077,7 +5075,7 @@ cb: this.node }); }, - createFilter: function(regexp, op, stub, hl, top) { + createFilter: function(regexp, boards, op, stub, hl, top) { var settings, test; test = typeof regexp === 'string' ? function(value) { return regexp === value; @@ -5090,7 +5088,10 @@ "class": hl, top: top }; - return function(value, isReply) { + return function(value, boardID, isReply) { + if (boards && indexOf.call(boards, boardID) < 0) { + return false; + } if (isReply && op === 'only' || !isReply && op === 'no') { return false; } @@ -5110,7 +5111,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (!(result = filter(value, this.isReply))) { + if (!(result = filter(value, this.board.ID, this.isReply))) { continue; } if (result.hide && !this.isFetchedQuote) { @@ -5141,7 +5142,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (result = filter(value, post.isReply)) { + if (result = filter(value, post.boardID, post.isReply)) { if (result.hide) { return true; } diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index ba8c89051..d29dca0d7 100644 Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js index 924dac779..02f4489f3 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.13.4 +// @version 1.10.14.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -395,7 +395,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.13.4', + VERSION: '1.10.14.0', NAMESPACE: '4chan X.', boards: {} }; @@ -5011,7 +5011,7 @@ Filter = { filters: {}, init: function() { - var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, ref6, regexp, stub, top; + var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, regexp, stub, top; if (!(((ref = g.VIEW) === 'index' || ref === 'thread') && Conf['Filter'])) { return; } @@ -5031,9 +5031,7 @@ } filter = line.replace(regexp[0], ''); boards = ((ref2 = filter.match(/boards:([^;]+)/)) != null ? ref2[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (ref3 = g.BOARD.ID, indexOf.call(boards.split(','), ref3) < 0)) { - continue; - } + boards = boards === 'global' ? null : boards.split(','); if (key === 'uniqueID' || key === 'MD5') { regexp = regexp[1]; } else { @@ -5045,10 +5043,10 @@ continue; } } - op = ((ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref4[1] : void 0) || 'yes'; + op = ((ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref3[1] : void 0) || 'yes'; stub = (function() { - var ref5; - switch ((ref5 = filter.match(/stub:(yes|no)/)) != null ? ref5[1] : void 0) { + var ref4; + switch ((ref4 = filter.match(/stub:(yes|no)/)) != null ? ref4[1] : void 0) { case 'yes': return true; case 'no': @@ -5058,11 +5056,11 @@ } })(); if (hl = /highlight/.test(filter)) { - hl = ((ref5 = filter.match(/highlight:([\w-]+)/)) != null ? ref5[1] : void 0) || 'filter-highlight'; - top = ((ref6 = filter.match(/top:(yes|no)/)) != null ? ref6[1] : void 0) || 'yes'; + hl = ((ref4 = filter.match(/highlight:([\w-]+)/)) != null ? ref4[1] : void 0) || 'filter-highlight'; + top = ((ref5 = filter.match(/top:(yes|no)/)) != null ? ref5[1] : void 0) || 'yes'; top = top === 'yes'; } - this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); + this.filters[key].push(this.createFilter(regexp, boards, op, stub, hl, top)); } if (!this.filters[key].length) { delete this.filters[key]; @@ -5076,7 +5074,7 @@ cb: this.node }); }, - createFilter: function(regexp, op, stub, hl, top) { + createFilter: function(regexp, boards, op, stub, hl, top) { var settings, test; test = typeof regexp === 'string' ? function(value) { return regexp === value; @@ -5089,7 +5087,10 @@ "class": hl, top: top }; - return function(value, isReply) { + return function(value, boardID, isReply) { + if (boards && indexOf.call(boards, boardID) < 0) { + return false; + } if (isReply && op === 'only' || !isReply && op === 'no') { return false; } @@ -5109,7 +5110,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (!(result = filter(value, this.isReply))) { + if (!(result = filter(value, this.board.ID, this.isReply))) { continue; } if (result.hide && !this.isFetchedQuote) { @@ -5140,7 +5141,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (result = filter(value, post.isReply)) { + if (result = filter(value, post.boardID, post.isReply)) { if (result.hide) { return true; } diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 13516b5b4..59f4eeb0c 100644 Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 5a6d84f9d..6dc66a991 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.10.13.4 +// @version 1.10.14.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 234ec6b4b..21ffa5c57 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.13.4 +// @version 1.10.14.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -396,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.13.4', + VERSION: '1.10.14.0', NAMESPACE: '4chan X.', boards: {} }; @@ -5012,7 +5012,7 @@ Filter = { filters: {}, init: function() { - var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, ref6, regexp, stub, top; + var boards, err, filter, hl, k, key, len1, line, op, ref, ref1, ref2, ref3, ref4, ref5, regexp, stub, top; if (!(((ref = g.VIEW) === 'index' || ref === 'thread') && Conf['Filter'])) { return; } @@ -5032,9 +5032,7 @@ } filter = line.replace(regexp[0], ''); boards = ((ref2 = filter.match(/boards:([^;]+)/)) != null ? ref2[1].toLowerCase() : void 0) || 'global'; - if (boards !== 'global' && (ref3 = g.BOARD.ID, indexOf.call(boards.split(','), ref3) < 0)) { - continue; - } + boards = boards === 'global' ? null : boards.split(','); if (key === 'uniqueID' || key === 'MD5') { regexp = regexp[1]; } else { @@ -5046,10 +5044,10 @@ continue; } } - op = ((ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref4[1] : void 0) || 'yes'; + op = ((ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? ref3[1] : void 0) || 'yes'; stub = (function() { - var ref5; - switch ((ref5 = filter.match(/stub:(yes|no)/)) != null ? ref5[1] : void 0) { + var ref4; + switch ((ref4 = filter.match(/stub:(yes|no)/)) != null ? ref4[1] : void 0) { case 'yes': return true; case 'no': @@ -5059,11 +5057,11 @@ } })(); if (hl = /highlight/.test(filter)) { - hl = ((ref5 = filter.match(/highlight:([\w-]+)/)) != null ? ref5[1] : void 0) || 'filter-highlight'; - top = ((ref6 = filter.match(/top:(yes|no)/)) != null ? ref6[1] : void 0) || 'yes'; + hl = ((ref4 = filter.match(/highlight:([\w-]+)/)) != null ? ref4[1] : void 0) || 'filter-highlight'; + top = ((ref5 = filter.match(/top:(yes|no)/)) != null ? ref5[1] : void 0) || 'yes'; top = top === 'yes'; } - this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); + this.filters[key].push(this.createFilter(regexp, boards, op, stub, hl, top)); } if (!this.filters[key].length) { delete this.filters[key]; @@ -5077,7 +5075,7 @@ cb: this.node }); }, - createFilter: function(regexp, op, stub, hl, top) { + createFilter: function(regexp, boards, op, stub, hl, top) { var settings, test; test = typeof regexp === 'string' ? function(value) { return regexp === value; @@ -5090,7 +5088,10 @@ "class": hl, top: top }; - return function(value, isReply) { + return function(value, boardID, isReply) { + if (boards && indexOf.call(boards, boardID) < 0) { + return false; + } if (isReply && op === 'only' || !isReply && op === 'no') { return false; } @@ -5110,7 +5111,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (!(result = filter(value, this.isReply))) { + if (!(result = filter(value, this.board.ID, this.isReply))) { continue; } if (result.hide && !this.isFetchedQuote) { @@ -5141,7 +5142,7 @@ ref = Filter.filters[key]; for (k = 0, len1 = ref.length; k < len1; k++) { filter = ref[k]; - if (result = filter(value, post.isReply)) { + if (result = filter(value, post.boardID, post.isReply)) { if (result.hide) { return true; } diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 7c86788b3..c709ee8fb 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index f212732d8..fe134e433 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index 0c1883313..42d3f80cd 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index 0536544c3..fbf01439d 100755 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", - "version": "1.10.13.4", - "date": "2015-06-05T22:09:56.541Z", + "version": "1.10.14.0", + "date": "2015-06-08T05:06:07.625Z", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",