Release 4chan X v1.9.18.9.

This commit is contained in:
ccd0 2015-01-04 10:35:06 -08:00
parent 353b930eb7
commit 87d4959a98
14 changed files with 465 additions and 288 deletions

View File

@ -3,6 +3,12 @@ The attributions below are for work that has been incorporated into the script a
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). 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.9.18.x --> <!-- v1.9.18.x -->
### v1.9.18.9
*2015-01-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.9/builds/4chan-X-noupdate.crx "Chromium version")]
**ccd0**
- Support new archived threads list page.
### v1.9.18.8 ### v1.9.18.8
*2015-01-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.crx "Chromium version")] *2015-01-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.crx "Chromium version")]

View File

@ -1,5 +1,5 @@
/* /*
* 4chan X - Version 1.9.18.8 * 4chan X - Version 1.9.18.9
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE * https://github.com/ccd0/4chan-x/blob/master/LICENSE

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.9.18.8 // @version 1.9.18.9
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.9.18.8 // @version 1.9.18.9
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* 4chan X - Version 1.9.18.8 * 4chan X - Version 1.9.18.9
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE * https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -395,7 +395,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.9.18.8', VERSION: '1.9.18.9',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
NAME: '4chan X', NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -2669,10 +2669,13 @@
className: 'navLinks' className: 'navLinks'
}); });
$.extend(this.navLinks, { $.extend(this.navLinks, {
innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>" innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap archlistlink\"><a href=\"./archive\">Archive</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>"
}); });
$('.returnlink a', this.navLinks).href = CatalogLinks.index(); $('.returnlink a', this.navLinks).href = CatalogLinks.index();
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog(); $('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
if (g.BOARD.ID === 'b') {
$('.archlistlink', this.navLinks).hidden = true;
}
this.searchInput = $('#index-search', this.navLinks); this.searchInput = $('#index-search', this.navLinks);
this.hideLabel = $('#hidden-label', this.navLinks); this.hideLabel = $('#hidden-label', this.navLinks);
this.selectMode = $('#index-mode', this.navLinks); this.selectMode = $('#index-mode', this.navLinks);
@ -4811,9 +4814,13 @@
Anonymize = { Anonymize = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Anonymize']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
return; return;
} }
if (g.VIEW === 'archive') {
return this.archive();
}
return Post.callbacks.push({ return Post.callbacks.push({
name: 'Anonymize', name: 'Anonymize',
cb: this.node cb: this.node
@ -4836,14 +4843,31 @@
$.replace(email, name); $.replace(email, name);
return delete this.nodes.email; return delete this.nodes.email;
} }
},
archive: function() {
return $.ready(function() {
var name, trip, _i, _j, _len, _len1, _ref, _ref1, _results;
_ref = $$('.name');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
name.textContent = 'Anonymous';
}
_ref1 = $$('.postertrip');
_results = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
trip = _ref1[_j];
_results.push($.rm(trip));
}
return _results;
});
} }
}; };
Filter = { Filter = {
filters: {}, filters: {},
init: function() { init: function() {
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (g.VIEW === 'catalog' || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
return; return;
} }
if (!Conf['Filtered Backlinks']) { if (!Conf['Filtered Backlinks']) {
@ -4851,9 +4875,9 @@
} }
for (key in Config.filter) { for (key in Config.filter) {
this.filters[key] = []; this.filters[key] = [];
_ref = Conf[key].split('\n'); _ref1 = Conf[key].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
line = _ref[_i]; line = _ref1[_i];
if (line[0] === '#') { if (line[0] === '#') {
continue; continue;
} }
@ -4861,8 +4885,8 @@
continue; continue;
} }
filter = line.replace(regexp[0], ''); filter = line.replace(regexp[0], '');
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; boards = ((_ref2 = filter.match(/boards:([^;]+)/)) != null ? _ref2[1].toLowerCase() : void 0) || 'global';
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { if (boards !== 'global' && (_ref3 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref3) < 0)) {
continue; continue;
} }
if (key === 'uniqueID' || key === 'MD5') { if (key === 'uniqueID' || key === 'MD5') {
@ -4876,10 +4900,10 @@
continue; continue;
} }
} }
op = ((_ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref3[1] : void 0) || 'yes'; op = ((_ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref4[1] : void 0) || 'yes';
stub = (function() { stub = (function() {
var _ref4; var _ref5;
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) { switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
case 'yes': case 'yes':
return true; return true;
case 'no': case 'no':
@ -4889,8 +4913,8 @@
} }
})(); })();
if (hl = /highlight/.test(filter)) { if (hl = /highlight/.test(filter)) {
hl = ((_ref4 = filter.match(/highlight:(\w+)/)) != null ? _ref4[1] : void 0) || 'filter-highlight'; hl = ((_ref5 = filter.match(/highlight:(\w+)/)) != null ? _ref5[1] : void 0) || 'filter-highlight';
top = ((_ref5 = filter.match(/top:(yes|no)/)) != null ? _ref5[1] : void 0) || 'yes'; top = ((_ref6 = filter.match(/top:(yes|no)/)) != null ? _ref6[1] : void 0) || 'yes';
top = top === 'yes'; top = top === 'yes';
} }
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
@ -5036,8 +5060,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5052,9 +5076,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']]; _ref1 = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1])); entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -5111,7 +5135,8 @@
PostHiding = { PostHiding = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) {
return; return;
} }
if (Conf['Reply Hiding Buttons']) { if (Conf['Reply Hiding Buttons']) {
@ -5147,8 +5172,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var apply, div, hideStubLink, makeStub, replies, thisPost; var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5407,7 +5432,8 @@
Recursive = { Recursive = {
recursives: {}, recursives: {},
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -5470,7 +5496,8 @@
ThreadHiding = { ThreadHiding = {
init: function() { init: function() {
if (g.VIEW === 'thread' || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'catalog') || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) {
return; return;
} }
this.db = new DataBoard('hiddenThreads'); this.db = new DataBoard('hiddenThreads');
@ -5742,7 +5769,8 @@
QuoteBacklink = { QuoteBacklink = {
containers: {}, containers: {},
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
return; return;
} }
Post.callbacks.push({ Post.callbacks.push({
@ -5827,7 +5855,8 @@
QuoteCT = { QuoteCT = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark Cross-thread Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark Cross-thread Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -5864,7 +5893,8 @@
QuoteInline = { QuoteInline = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
return; return;
} }
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) { this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
@ -5983,7 +6013,8 @@
QuoteOP = { QuoteOP = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6026,7 +6057,8 @@
QuotePreview = { QuotePreview = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6109,7 +6141,8 @@
QuoteStrikeThrough = { QuoteStrikeThrough = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -6313,7 +6346,8 @@
QuoteYou = { QuoteYou = {
init: function() { init: function() {
if (!(g.VIEW !== 'catalog' && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { var _ref;
if (!(((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) {
return; return;
} }
if (Conf['Highlight Own Posts']) { if (Conf['Highlight Own Posts']) {
@ -6402,7 +6436,8 @@
Quotify = { Quotify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -8728,8 +8763,8 @@
FappeTyme = { FappeTyme = {
init: function() { init: function() {
var el, lc, type, _i, _len, _ref; var el, lc, type, _i, _len, _ref, _ref1;
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
return; return;
} }
this.nodes = {}; this.nodes = {};
@ -8737,9 +8772,9 @@
fappe: false, fappe: false,
werk: Conf['werk'] werk: Conf['werk']
}; };
_ref = ["Fappe", "Werk"]; _ref1 = ["Fappe", "Werk"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
if (!Conf["" + type + " Tyme"]) { if (!Conf["" + type + " Tyme"]) {
continue; continue;
} }
@ -8800,8 +8835,8 @@
Gallery = { Gallery = {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
return; return;
} }
this.delay = Conf['Slide Delay']; this.delay = Conf['Slide Delay'];
@ -9188,8 +9223,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9348,7 +9383,8 @@
ImageExpand = { ImageExpand = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
this.EAI = $.el('a', { this.EAI = $.el('a', {
@ -9711,8 +9747,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var conf, createSubEntry, el, name, subEntries, _ref; var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9721,9 +9757,9 @@
}); });
createSubEntry = ImageExpand.menu.createSubEntry; createSubEntry = ImageExpand.menu.createSubEntry;
subEntries = []; subEntries = [];
_ref = Config.imageExpansion; _ref1 = Config.imageExpansion;
for (name in _ref) { for (name in _ref1) {
conf = _ref[name]; conf = _ref1[name];
subEntries.push(createSubEntry(name, conf[1])); subEntries.push(createSubEntry(name, conf[1]));
} }
return Header.menu.addEntry({ return Header.menu.addEntry({
@ -9751,7 +9787,8 @@
ImageHover = { ImageHover = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (Conf['Image Hover']) { if (Conf['Image Hover']) {
@ -9867,8 +9904,8 @@
ImageLoader = { ImageLoader = {
init: function() { init: function() {
var prefetch; var prefetch, _ref;
if (g.VIEW === 'catalog') { if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) { if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
@ -9883,14 +9920,14 @@
}); });
if (Conf['Replace WEBM']) { if (Conf['Replace WEBM']) {
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() { $.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
var qpClone, _ref; var qpClone, _ref1;
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0; qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
return g.posts.forEach(function(post) { return g.posts.forEach(function(post) {
var thumb, _i, _len, _ref1, _ref2; var thumb, _i, _len, _ref2, _ref3;
_ref1 = [post].concat(__slice.call(post.clones)); _ref2 = [post].concat(__slice.call(post.clones));
for (_i = 0, _len = _ref1.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
post = _ref1[_i]; post = _ref2[_i];
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) { if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
continue; continue;
} }
thumb = post.file.thumb; thumb = post.file.thumb;
@ -10004,7 +10041,8 @@
RevealSpoilers = { RevealSpoilers = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reveal Spoiler Thumbnails']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -10025,14 +10063,14 @@
Sauce = { Sauce = {
init: function() { init: function() {
var err, link, links, _i, _len, _ref; var err, link, links, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Sauce']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
return; return;
} }
links = []; links = [];
_ref = Conf['sauces'].split('\n'); _ref1 = Conf['sauces'].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
link = _ref[_i]; link = _ref1[_i];
try { try {
if (link[0] !== '#') { if (link[0] !== '#') {
links.push(link.trim()); links.push(link.trim());
@ -10773,7 +10811,8 @@
Linkify = { Linkify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Linkify']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -10913,8 +10952,8 @@
ArchiveLink = { ArchiveLink = {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -10934,9 +10973,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']]; _ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(this.createSubEntry(type[0], type[1])); entry.subEntries.push(this.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -10979,8 +11018,8 @@
DeleteLink = { DeleteLink = {
init: function() { init: function() {
var div, fileEl, fileEntry, postEl, postEntry; var div, fileEl, fileEntry, postEl, postEntry, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -11117,8 +11156,8 @@
DownloadLink = { DownloadLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -11160,7 +11199,8 @@
Menu = { Menu = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Menu']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
return; return;
} }
this.button = $.el('a', { this.button = $.el('a', {
@ -11201,8 +11241,8 @@
ReportLink = { ReportLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -13253,6 +13293,7 @@
selector = (function() { selector = (function() {
switch (g.VIEW) { switch (g.VIEW) {
case 'thread': case 'thread':
case 'archive':
return '.navLinks.desktop > a'; return '.navLinks.desktop > a';
case 'catalog': case 'catalog':
return '.navLinks > :first-child > a'; return '.navLinks > :first-child > a';
@ -13645,7 +13686,8 @@
FileInfo = { FileInfo = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['File Info Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['File Info Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13763,7 +13805,8 @@
Fourchan = { Fourchan = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (g.BOARD.ID === 'g') { if (g.BOARD.ID === 'g') {
@ -13823,7 +13866,8 @@
IDColor = { IDColor = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
return; return;
} }
this.ids = {}; this.ids = {};
@ -13871,7 +13915,8 @@
IDHighlight = { IDHighlight = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13931,7 +13976,7 @@
return Conf[hotkey] = key; return Conf[hotkey] = key;
}, },
keydown: function(e) { keydown: function(e) {
var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2; var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (!(key = Keybinds.keyCode(e))) { if (!(key = Keybinds.keyCode(e))) {
return; return;
} }
@ -13941,7 +13986,7 @@
return; return;
} }
} }
if (!(g.VIEW === 'catalog' || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) { if (!(((_ref1 = g.VIEW) !== 'index' && _ref1 !== 'thread') || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) {
threadRoot = Nav.getThread(); threadRoot = Nav.getThread();
if (op = $('.op', threadRoot)) { if (op = $('.op', threadRoot)) {
thread = Get.postFromNode(op).thread; thread = Get.postFromNode(op).thread;
@ -14064,19 +14109,19 @@
Keybinds.img(threadRoot, true); Keybinds.img(threadRoot, true);
break; break;
case Conf['Open Gallery']: case Conf['Open Gallery']:
if (g.VIEW === 'catalog') { if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
return; return;
} }
Gallery.cb.toggle(); Gallery.cb.toggle();
break; break;
case Conf['fappeTyme']: case Conf['fappeTyme']:
if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Fappe Tyme'] || ((_ref3 = g.VIEW) !== 'index' && _ref3 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('fappe'); FappeTyme.toggle('fappe');
break; break;
case Conf['werkTyme']: case Conf['werkTyme']:
if (!Conf['Werk Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Werk Tyme'] || ((_ref4 = g.VIEW) !== 'index' && _ref4 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('werk'); FappeTyme.toggle('werk');
@ -14096,7 +14141,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') { if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
return; return;
} }
$('.next button', Index.pagelist).click(); $('.next button', Index.pagelist).click();
@ -14111,7 +14156,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') { if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
return; return;
} }
$('.prev button', Index.pagelist).click(); $('.prev button', Index.pagelist).click();
@ -14460,7 +14505,8 @@
RelativeDates = { RelativeDates = {
INTERVAL: $.MINUTE / 2, INTERVAL: $.MINUTE / 2,
init: function() { init: function() {
if (g.VIEW !== 'catalog' && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') { var _ref;
if (((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') {
this.flush(); this.flush();
$.on(d, 'visibilitychange ThreadUpdate', this.flush); $.on(d, 'visibilitychange ThreadUpdate', this.flush);
} }
@ -14566,14 +14612,22 @@
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
return CatalogThread.callbacks.push({ CatalogThread.callbacks.push({
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
if (g.VIEW === 'archive') {
return $.ready(function() {
return RemoveSpoilers.unspoiler($.id('arc-list'));
});
}
}, },
node: function(post) { node: function(post) {
return RemoveSpoilers.unspoiler(this.nodes.comment);
},
unspoiler: function(el) {
var span, spoiler, spoilers, _i, _len; var span, spoiler, spoilers, _i, _len;
spoilers = $$('s', this.nodes.comment); spoilers = $$('s', el);
for (_i = 0, _len = spoilers.length; _i < _len; _i++) { for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
spoiler = spoilers[_i]; spoiler = spoilers[_i];
span = $.el('span', { span = $.el('span', {
@ -14587,7 +14641,8 @@
Time = { Time = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -15379,6 +15434,8 @@
return 'thread'; return 'thread';
case 'catalog': case 'catalog':
return 'catalog'; return 'catalog';
case 'archive':
return 'archive';
default: default:
return 'index'; return 'index';
} }

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.9.18.8 // @version 1.9.18.9
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -24,7 +24,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* 4chan X - Version 1.9.18.8 * 4chan X - Version 1.9.18.9
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE * https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -394,7 +394,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.9.18.8', VERSION: '1.9.18.9',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
NAME: '4chan X', NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -2668,10 +2668,13 @@
className: 'navLinks' className: 'navLinks'
}); });
$.extend(this.navLinks, { $.extend(this.navLinks, {
innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>" innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap archlistlink\"><a href=\"./archive\">Archive</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>"
}); });
$('.returnlink a', this.navLinks).href = CatalogLinks.index(); $('.returnlink a', this.navLinks).href = CatalogLinks.index();
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog(); $('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
if (g.BOARD.ID === 'b') {
$('.archlistlink', this.navLinks).hidden = true;
}
this.searchInput = $('#index-search', this.navLinks); this.searchInput = $('#index-search', this.navLinks);
this.hideLabel = $('#hidden-label', this.navLinks); this.hideLabel = $('#hidden-label', this.navLinks);
this.selectMode = $('#index-mode', this.navLinks); this.selectMode = $('#index-mode', this.navLinks);
@ -4810,9 +4813,13 @@
Anonymize = { Anonymize = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Anonymize']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
return; return;
} }
if (g.VIEW === 'archive') {
return this.archive();
}
return Post.callbacks.push({ return Post.callbacks.push({
name: 'Anonymize', name: 'Anonymize',
cb: this.node cb: this.node
@ -4835,14 +4842,31 @@
$.replace(email, name); $.replace(email, name);
return delete this.nodes.email; return delete this.nodes.email;
} }
},
archive: function() {
return $.ready(function() {
var name, trip, _i, _j, _len, _len1, _ref, _ref1, _results;
_ref = $$('.name');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
name.textContent = 'Anonymous';
}
_ref1 = $$('.postertrip');
_results = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
trip = _ref1[_j];
_results.push($.rm(trip));
}
return _results;
});
} }
}; };
Filter = { Filter = {
filters: {}, filters: {},
init: function() { init: function() {
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (g.VIEW === 'catalog' || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
return; return;
} }
if (!Conf['Filtered Backlinks']) { if (!Conf['Filtered Backlinks']) {
@ -4850,9 +4874,9 @@
} }
for (key in Config.filter) { for (key in Config.filter) {
this.filters[key] = []; this.filters[key] = [];
_ref = Conf[key].split('\n'); _ref1 = Conf[key].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
line = _ref[_i]; line = _ref1[_i];
if (line[0] === '#') { if (line[0] === '#') {
continue; continue;
} }
@ -4860,8 +4884,8 @@
continue; continue;
} }
filter = line.replace(regexp[0], ''); filter = line.replace(regexp[0], '');
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; boards = ((_ref2 = filter.match(/boards:([^;]+)/)) != null ? _ref2[1].toLowerCase() : void 0) || 'global';
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { if (boards !== 'global' && (_ref3 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref3) < 0)) {
continue; continue;
} }
if (key === 'uniqueID' || key === 'MD5') { if (key === 'uniqueID' || key === 'MD5') {
@ -4875,10 +4899,10 @@
continue; continue;
} }
} }
op = ((_ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref3[1] : void 0) || 'yes'; op = ((_ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref4[1] : void 0) || 'yes';
stub = (function() { stub = (function() {
var _ref4; var _ref5;
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) { switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
case 'yes': case 'yes':
return true; return true;
case 'no': case 'no':
@ -4888,8 +4912,8 @@
} }
})(); })();
if (hl = /highlight/.test(filter)) { if (hl = /highlight/.test(filter)) {
hl = ((_ref4 = filter.match(/highlight:(\w+)/)) != null ? _ref4[1] : void 0) || 'filter-highlight'; hl = ((_ref5 = filter.match(/highlight:(\w+)/)) != null ? _ref5[1] : void 0) || 'filter-highlight';
top = ((_ref5 = filter.match(/top:(yes|no)/)) != null ? _ref5[1] : void 0) || 'yes'; top = ((_ref6 = filter.match(/top:(yes|no)/)) != null ? _ref6[1] : void 0) || 'yes';
top = top === 'yes'; top = top === 'yes';
} }
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
@ -5035,8 +5059,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5051,9 +5075,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']]; _ref1 = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1])); entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -5110,7 +5134,8 @@
PostHiding = { PostHiding = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) {
return; return;
} }
if (Conf['Reply Hiding Buttons']) { if (Conf['Reply Hiding Buttons']) {
@ -5146,8 +5171,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var apply, div, hideStubLink, makeStub, replies, thisPost; var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5406,7 +5431,8 @@
Recursive = { Recursive = {
recursives: {}, recursives: {},
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -5469,7 +5495,8 @@
ThreadHiding = { ThreadHiding = {
init: function() { init: function() {
if (g.VIEW === 'thread' || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'catalog') || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) {
return; return;
} }
this.db = new DataBoard('hiddenThreads'); this.db = new DataBoard('hiddenThreads');
@ -5741,7 +5768,8 @@
QuoteBacklink = { QuoteBacklink = {
containers: {}, containers: {},
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
return; return;
} }
Post.callbacks.push({ Post.callbacks.push({
@ -5826,7 +5854,8 @@
QuoteCT = { QuoteCT = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark Cross-thread Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark Cross-thread Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -5863,7 +5892,8 @@
QuoteInline = { QuoteInline = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
return; return;
} }
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) { this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
@ -5982,7 +6012,8 @@
QuoteOP = { QuoteOP = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6025,7 +6056,8 @@
QuotePreview = { QuotePreview = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6108,7 +6140,8 @@
QuoteStrikeThrough = { QuoteStrikeThrough = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -6312,7 +6345,8 @@
QuoteYou = { QuoteYou = {
init: function() { init: function() {
if (!(g.VIEW !== 'catalog' && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { var _ref;
if (!(((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) {
return; return;
} }
if (Conf['Highlight Own Posts']) { if (Conf['Highlight Own Posts']) {
@ -6401,7 +6435,8 @@
Quotify = { Quotify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -8727,8 +8762,8 @@
FappeTyme = { FappeTyme = {
init: function() { init: function() {
var el, lc, type, _i, _len, _ref; var el, lc, type, _i, _len, _ref, _ref1;
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
return; return;
} }
this.nodes = {}; this.nodes = {};
@ -8736,9 +8771,9 @@
fappe: false, fappe: false,
werk: Conf['werk'] werk: Conf['werk']
}; };
_ref = ["Fappe", "Werk"]; _ref1 = ["Fappe", "Werk"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
if (!Conf["" + type + " Tyme"]) { if (!Conf["" + type + " Tyme"]) {
continue; continue;
} }
@ -8799,8 +8834,8 @@
Gallery = { Gallery = {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
return; return;
} }
this.delay = Conf['Slide Delay']; this.delay = Conf['Slide Delay'];
@ -9187,8 +9222,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9347,7 +9382,8 @@
ImageExpand = { ImageExpand = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
this.EAI = $.el('a', { this.EAI = $.el('a', {
@ -9710,8 +9746,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var conf, createSubEntry, el, name, subEntries, _ref; var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9720,9 +9756,9 @@
}); });
createSubEntry = ImageExpand.menu.createSubEntry; createSubEntry = ImageExpand.menu.createSubEntry;
subEntries = []; subEntries = [];
_ref = Config.imageExpansion; _ref1 = Config.imageExpansion;
for (name in _ref) { for (name in _ref1) {
conf = _ref[name]; conf = _ref1[name];
subEntries.push(createSubEntry(name, conf[1])); subEntries.push(createSubEntry(name, conf[1]));
} }
return Header.menu.addEntry({ return Header.menu.addEntry({
@ -9750,7 +9786,8 @@
ImageHover = { ImageHover = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (Conf['Image Hover']) { if (Conf['Image Hover']) {
@ -9866,8 +9903,8 @@
ImageLoader = { ImageLoader = {
init: function() { init: function() {
var prefetch; var prefetch, _ref;
if (g.VIEW === 'catalog') { if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) { if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
@ -9882,14 +9919,14 @@
}); });
if (Conf['Replace WEBM']) { if (Conf['Replace WEBM']) {
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() { $.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
var qpClone, _ref; var qpClone, _ref1;
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0; qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
return g.posts.forEach(function(post) { return g.posts.forEach(function(post) {
var thumb, _i, _len, _ref1, _ref2; var thumb, _i, _len, _ref2, _ref3;
_ref1 = [post].concat(__slice.call(post.clones)); _ref2 = [post].concat(__slice.call(post.clones));
for (_i = 0, _len = _ref1.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
post = _ref1[_i]; post = _ref2[_i];
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) { if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
continue; continue;
} }
thumb = post.file.thumb; thumb = post.file.thumb;
@ -10003,7 +10040,8 @@
RevealSpoilers = { RevealSpoilers = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reveal Spoiler Thumbnails']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -10024,14 +10062,14 @@
Sauce = { Sauce = {
init: function() { init: function() {
var err, link, links, _i, _len, _ref; var err, link, links, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Sauce']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
return; return;
} }
links = []; links = [];
_ref = Conf['sauces'].split('\n'); _ref1 = Conf['sauces'].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
link = _ref[_i]; link = _ref1[_i];
try { try {
if (link[0] !== '#') { if (link[0] !== '#') {
links.push(link.trim()); links.push(link.trim());
@ -10772,7 +10810,8 @@
Linkify = { Linkify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Linkify']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -10912,8 +10951,8 @@
ArchiveLink = { ArchiveLink = {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -10933,9 +10972,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']]; _ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(this.createSubEntry(type[0], type[1])); entry.subEntries.push(this.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -10978,8 +11017,8 @@
DeleteLink = { DeleteLink = {
init: function() { init: function() {
var div, fileEl, fileEntry, postEl, postEntry; var div, fileEl, fileEntry, postEl, postEntry, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -11116,8 +11155,8 @@
DownloadLink = { DownloadLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -11159,7 +11198,8 @@
Menu = { Menu = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Menu']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
return; return;
} }
this.button = $.el('a', { this.button = $.el('a', {
@ -11200,8 +11240,8 @@
ReportLink = { ReportLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -13252,6 +13292,7 @@
selector = (function() { selector = (function() {
switch (g.VIEW) { switch (g.VIEW) {
case 'thread': case 'thread':
case 'archive':
return '.navLinks.desktop > a'; return '.navLinks.desktop > a';
case 'catalog': case 'catalog':
return '.navLinks > :first-child > a'; return '.navLinks > :first-child > a';
@ -13644,7 +13685,8 @@
FileInfo = { FileInfo = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['File Info Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['File Info Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13762,7 +13804,8 @@
Fourchan = { Fourchan = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (g.BOARD.ID === 'g') { if (g.BOARD.ID === 'g') {
@ -13822,7 +13865,8 @@
IDColor = { IDColor = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
return; return;
} }
this.ids = {}; this.ids = {};
@ -13870,7 +13914,8 @@
IDHighlight = { IDHighlight = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13930,7 +13975,7 @@
return Conf[hotkey] = key; return Conf[hotkey] = key;
}, },
keydown: function(e) { keydown: function(e) {
var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2; var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (!(key = Keybinds.keyCode(e))) { if (!(key = Keybinds.keyCode(e))) {
return; return;
} }
@ -13940,7 +13985,7 @@
return; return;
} }
} }
if (!(g.VIEW === 'catalog' || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) { if (!(((_ref1 = g.VIEW) !== 'index' && _ref1 !== 'thread') || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) {
threadRoot = Nav.getThread(); threadRoot = Nav.getThread();
if (op = $('.op', threadRoot)) { if (op = $('.op', threadRoot)) {
thread = Get.postFromNode(op).thread; thread = Get.postFromNode(op).thread;
@ -14063,19 +14108,19 @@
Keybinds.img(threadRoot, true); Keybinds.img(threadRoot, true);
break; break;
case Conf['Open Gallery']: case Conf['Open Gallery']:
if (g.VIEW === 'catalog') { if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
return; return;
} }
Gallery.cb.toggle(); Gallery.cb.toggle();
break; break;
case Conf['fappeTyme']: case Conf['fappeTyme']:
if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Fappe Tyme'] || ((_ref3 = g.VIEW) !== 'index' && _ref3 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('fappe'); FappeTyme.toggle('fappe');
break; break;
case Conf['werkTyme']: case Conf['werkTyme']:
if (!Conf['Werk Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Werk Tyme'] || ((_ref4 = g.VIEW) !== 'index' && _ref4 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('werk'); FappeTyme.toggle('werk');
@ -14095,7 +14140,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') { if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
return; return;
} }
$('.next button', Index.pagelist).click(); $('.next button', Index.pagelist).click();
@ -14110,7 +14155,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') { if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
return; return;
} }
$('.prev button', Index.pagelist).click(); $('.prev button', Index.pagelist).click();
@ -14459,7 +14504,8 @@
RelativeDates = { RelativeDates = {
INTERVAL: $.MINUTE / 2, INTERVAL: $.MINUTE / 2,
init: function() { init: function() {
if (g.VIEW !== 'catalog' && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') { var _ref;
if (((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') {
this.flush(); this.flush();
$.on(d, 'visibilitychange ThreadUpdate', this.flush); $.on(d, 'visibilitychange ThreadUpdate', this.flush);
} }
@ -14565,14 +14611,22 @@
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
return CatalogThread.callbacks.push({ CatalogThread.callbacks.push({
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
if (g.VIEW === 'archive') {
return $.ready(function() {
return RemoveSpoilers.unspoiler($.id('arc-list'));
});
}
}, },
node: function(post) { node: function(post) {
return RemoveSpoilers.unspoiler(this.nodes.comment);
},
unspoiler: function(el) {
var span, spoiler, spoilers, _i, _len; var span, spoiler, spoilers, _i, _len;
spoilers = $$('s', this.nodes.comment); spoilers = $$('s', el);
for (_i = 0, _len = spoilers.length; _i < _len; _i++) { for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
spoiler = spoilers[_i]; spoiler = spoilers[_i];
span = $.el('span', { span = $.el('span', {
@ -14586,7 +14640,8 @@
Time = { Time = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -15378,6 +15433,8 @@
return 'thread'; return 'thread';
case 'catalog': case 'catalog':
return 'catalog'; return 'catalog';
case 'archive':
return 'archive';
default: default:
return 'index'; return 'index';
} }

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.9.18.8 // @version 1.9.18.9
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.9.18.8 // @version 1.9.18.9
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* 4chan X - Version 1.9.18.8 * 4chan X - Version 1.9.18.9
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE * https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -395,7 +395,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.9.18.8', VERSION: '1.9.18.9',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
NAME: '4chan X', NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -2669,10 +2669,13 @@
className: 'navLinks' className: 'navLinks'
}); });
$.extend(this.navLinks, { $.extend(this.navLinks, {
innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>" innerHTML: "<span class=\"brackets-wrap returnlink\"><a href=\"./\">Return</a></span> <span class=\"brackets-wrap cataloglink\"><a href=\"./catalog\">Catalog</a></span> <span class=\"brackets-wrap archlistlink\"><a href=\"./archive\">Archive</a></span> <span class=\"brackets-wrap bottomlink\"><a href=\"#bottom\">Bottom</a></span> <span class=\"brackets-wrap\" id=\"index-last-refresh\"><time title=\"Last index refresh\">...</time></span> <input type=\"search\" id=\"index-search\" class=\"field\" placeholder=\"Search\"><a id=\"index-search-clear\" href=\"javascript:;\" title=\"Clear search\">×</a><span id=\"hidden-label\" hidden> &mdash; <span id=\"hidden-count\"></span> <span id=\"hidden-toggle\">[<a href=\"javascript:;\">Show</a>]</span></span><select id=\"index-mode\" name=\"Index Mode\"><option disabled>Index Mode</option><option value=\"paged\">Paged</option><option value=\"infinite\">Infinite scrolling</option><option value=\"all pages\">All threads</option><option value=\"catalog\">Catalog</option></select><select id=\"index-sort\" name=\"Index Sort\"><option disabled>Index Sort</option><option value=\"bump\">Bump order</option><option value=\"lastreply\">Last reply</option><option value=\"birth\">Creation date</option><option value=\"replycount\">Reply count</option><option value=\"filecount\">File count</option></select><select id=\"index-size\" name=\"Index Size\"><option disabled>Image Size</option><option value=\"small\">Small</option><option value=\"large\">Large</option></select>"
}); });
$('.returnlink a', this.navLinks).href = CatalogLinks.index(); $('.returnlink a', this.navLinks).href = CatalogLinks.index();
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog(); $('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
if (g.BOARD.ID === 'b') {
$('.archlistlink', this.navLinks).hidden = true;
}
this.searchInput = $('#index-search', this.navLinks); this.searchInput = $('#index-search', this.navLinks);
this.hideLabel = $('#hidden-label', this.navLinks); this.hideLabel = $('#hidden-label', this.navLinks);
this.selectMode = $('#index-mode', this.navLinks); this.selectMode = $('#index-mode', this.navLinks);
@ -4811,9 +4814,13 @@
Anonymize = { Anonymize = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Anonymize']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
return; return;
} }
if (g.VIEW === 'archive') {
return this.archive();
}
return Post.callbacks.push({ return Post.callbacks.push({
name: 'Anonymize', name: 'Anonymize',
cb: this.node cb: this.node
@ -4836,14 +4843,31 @@
$.replace(email, name); $.replace(email, name);
return delete this.nodes.email; return delete this.nodes.email;
} }
},
archive: function() {
return $.ready(function() {
var name, trip, _i, _j, _len, _len1, _ref, _ref1, _results;
_ref = $$('.name');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
name.textContent = 'Anonymous';
}
_ref1 = $$('.postertrip');
_results = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
trip = _ref1[_j];
_results.push($.rm(trip));
}
return _results;
});
} }
}; };
Filter = { Filter = {
filters: {}, filters: {},
init: function() { init: function() {
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (g.VIEW === 'catalog' || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
return; return;
} }
if (!Conf['Filtered Backlinks']) { if (!Conf['Filtered Backlinks']) {
@ -4851,9 +4875,9 @@
} }
for (key in Config.filter) { for (key in Config.filter) {
this.filters[key] = []; this.filters[key] = [];
_ref = Conf[key].split('\n'); _ref1 = Conf[key].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
line = _ref[_i]; line = _ref1[_i];
if (line[0] === '#') { if (line[0] === '#') {
continue; continue;
} }
@ -4861,8 +4885,8 @@
continue; continue;
} }
filter = line.replace(regexp[0], ''); filter = line.replace(regexp[0], '');
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global'; boards = ((_ref2 = filter.match(/boards:([^;]+)/)) != null ? _ref2[1].toLowerCase() : void 0) || 'global';
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 0)) { if (boards !== 'global' && (_ref3 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref3) < 0)) {
continue; continue;
} }
if (key === 'uniqueID' || key === 'MD5') { if (key === 'uniqueID' || key === 'MD5') {
@ -4876,10 +4900,10 @@
continue; continue;
} }
} }
op = ((_ref3 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref3[1] : void 0) || 'yes'; op = ((_ref4 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref4[1] : void 0) || 'yes';
stub = (function() { stub = (function() {
var _ref4; var _ref5;
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) { switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
case 'yes': case 'yes':
return true; return true;
case 'no': case 'no':
@ -4889,8 +4913,8 @@
} }
})(); })();
if (hl = /highlight/.test(filter)) { if (hl = /highlight/.test(filter)) {
hl = ((_ref4 = filter.match(/highlight:(\w+)/)) != null ? _ref4[1] : void 0) || 'filter-highlight'; hl = ((_ref5 = filter.match(/highlight:(\w+)/)) != null ? _ref5[1] : void 0) || 'filter-highlight';
top = ((_ref5 = filter.match(/top:(yes|no)/)) != null ? _ref5[1] : void 0) || 'yes'; top = ((_ref6 = filter.match(/top:(yes|no)/)) != null ? _ref6[1] : void 0) || 'yes';
top = top === 'yes'; top = top === 'yes';
} }
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top)); this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
@ -5036,8 +5060,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5052,9 +5076,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']]; _ref1 = [['Name', 'name'], ['Unique ID', 'uniqueID'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Comment', 'comment'], ['Flag', 'flag'], ['Filename', 'filename'], ['Image dimensions', 'dimensions'], ['Filesize', 'filesize'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1])); entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -5111,7 +5135,8 @@
PostHiding = { PostHiding = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link'])) {
return; return;
} }
if (Conf['Reply Hiding Buttons']) { if (Conf['Reply Hiding Buttons']) {
@ -5147,8 +5172,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var apply, div, hideStubLink, makeStub, replies, thisPost; var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -5407,7 +5432,8 @@
Recursive = { Recursive = {
recursives: {}, recursives: {},
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -5470,7 +5496,8 @@
ThreadHiding = { ThreadHiding = {
init: function() { init: function() {
if (g.VIEW === 'thread' || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'catalog') || !Conf['Thread Hiding Buttons'] && !(Conf['Menu'] && Conf['Thread Hiding Link']) && !Conf['JSON Navigation']) {
return; return;
} }
this.db = new DataBoard('hiddenThreads'); this.db = new DataBoard('hiddenThreads');
@ -5742,7 +5769,8 @@
QuoteBacklink = { QuoteBacklink = {
containers: {}, containers: {},
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
return; return;
} }
Post.callbacks.push({ Post.callbacks.push({
@ -5827,7 +5855,8 @@
QuoteCT = { QuoteCT = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark Cross-thread Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark Cross-thread Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -5864,7 +5893,8 @@
QuoteInline = { QuoteInline = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
return; return;
} }
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) { this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
@ -5983,7 +6013,8 @@
QuoteOP = { QuoteOP = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6026,7 +6057,8 @@
QuotePreview = { QuotePreview = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -6109,7 +6141,8 @@
QuoteStrikeThrough = { QuoteStrikeThrough = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reply Hiding Buttons'] && !(Conf['Menu'] && Conf['Reply Hiding Link']) && !Conf['Filter']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -6313,7 +6346,8 @@
QuoteYou = { QuoteYou = {
init: function() { init: function() {
if (!(g.VIEW !== 'catalog' && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { var _ref;
if (!(((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Mark Quotes of You'] && Conf['Quick Reply'])) {
return; return;
} }
if (Conf['Highlight Own Posts']) { if (Conf['Highlight Own Posts']) {
@ -6402,7 +6436,8 @@
Quotify = { Quotify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -8728,8 +8763,8 @@
FappeTyme = { FappeTyme = {
init: function() { init: function() {
var el, lc, type, _i, _len, _ref; var el, lc, type, _i, _len, _ref, _ref1;
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
return; return;
} }
this.nodes = {}; this.nodes = {};
@ -8737,9 +8772,9 @@
fappe: false, fappe: false,
werk: Conf['werk'] werk: Conf['werk']
}; };
_ref = ["Fappe", "Werk"]; _ref1 = ["Fappe", "Werk"];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
if (!Conf["" + type + " Tyme"]) { if (!Conf["" + type + " Tyme"]) {
continue; continue;
} }
@ -8800,8 +8835,8 @@
Gallery = { Gallery = {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
return; return;
} }
this.delay = Conf['Slide Delay']; this.delay = Conf['Slide Delay'];
@ -9188,8 +9223,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var el; var el, _ref;
if (g.VIEW === 'catalog' || !Conf['Gallery']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9348,7 +9383,8 @@
ImageExpand = { ImageExpand = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
this.EAI = $.el('a', { this.EAI = $.el('a', {
@ -9711,8 +9747,8 @@
}, },
menu: { menu: {
init: function() { init: function() {
var conf, createSubEntry, el, name, subEntries, _ref; var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
return; return;
} }
el = $.el('span', { el = $.el('span', {
@ -9721,9 +9757,9 @@
}); });
createSubEntry = ImageExpand.menu.createSubEntry; createSubEntry = ImageExpand.menu.createSubEntry;
subEntries = []; subEntries = [];
_ref = Config.imageExpansion; _ref1 = Config.imageExpansion;
for (name in _ref) { for (name in _ref1) {
conf = _ref[name]; conf = _ref1[name];
subEntries.push(createSubEntry(name, conf[1])); subEntries.push(createSubEntry(name, conf[1]));
} }
return Header.menu.addEntry({ return Header.menu.addEntry({
@ -9751,7 +9787,8 @@
ImageHover = { ImageHover = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (Conf['Image Hover']) { if (Conf['Image Hover']) {
@ -9867,8 +9904,8 @@
ImageLoader = { ImageLoader = {
init: function() { init: function() {
var prefetch; var prefetch, _ref;
if (g.VIEW === 'catalog') { if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) { if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
@ -9883,14 +9920,14 @@
}); });
if (Conf['Replace WEBM']) { if (Conf['Replace WEBM']) {
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() { $.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
var qpClone, _ref; var qpClone, _ref1;
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0; qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
return g.posts.forEach(function(post) { return g.posts.forEach(function(post) {
var thumb, _i, _len, _ref1, _ref2; var thumb, _i, _len, _ref2, _ref3;
_ref1 = [post].concat(__slice.call(post.clones)); _ref2 = [post].concat(__slice.call(post.clones));
for (_i = 0, _len = _ref1.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
post = _ref1[_i]; post = _ref2[_i];
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) { if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
continue; continue;
} }
thumb = post.file.thumb; thumb = post.file.thumb;
@ -10004,7 +10041,8 @@
RevealSpoilers = { RevealSpoilers = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Reveal Spoiler Thumbnails']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -10025,14 +10063,14 @@
Sauce = { Sauce = {
init: function() { init: function() {
var err, link, links, _i, _len, _ref; var err, link, links, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Sauce']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
return; return;
} }
links = []; links = [];
_ref = Conf['sauces'].split('\n'); _ref1 = Conf['sauces'].split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
link = _ref[_i]; link = _ref1[_i];
try { try {
if (link[0] !== '#') { if (link[0] !== '#') {
links.push(link.trim()); links.push(link.trim());
@ -10773,7 +10811,8 @@
Linkify = { Linkify = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Linkify']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
return; return;
} }
if (Conf['Comment Expansion']) { if (Conf['Comment Expansion']) {
@ -10913,8 +10952,8 @@
ArchiveLink = { ArchiveLink = {
init: function() { init: function() {
var div, entry, type, _i, _len, _ref; var div, entry, type, _i, _len, _ref, _ref1;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -10934,9 +10973,9 @@
}, },
subEntries: [] subEntries: []
}; };
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']]; _ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
type = _ref[_i]; type = _ref1[_i];
entry.subEntries.push(this.createSubEntry(type[0], type[1])); entry.subEntries.push(this.createSubEntry(type[0], type[1]));
} }
return Menu.menu.addEntry(entry); return Menu.menu.addEntry(entry);
@ -10979,8 +11018,8 @@
DeleteLink = { DeleteLink = {
init: function() { init: function() {
var div, fileEl, fileEntry, postEl, postEntry; var div, fileEl, fileEntry, postEl, postEntry, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
return; return;
} }
div = $.el('div', { div = $.el('div', {
@ -11117,8 +11156,8 @@
DownloadLink = { DownloadLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -11160,7 +11199,8 @@
Menu = { Menu = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Menu']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
return; return;
} }
this.button = $.el('a', { this.button = $.el('a', {
@ -11201,8 +11241,8 @@
ReportLink = { ReportLink = {
init: function() { init: function() {
var a; var a, _ref;
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
return; return;
} }
a = $.el('a', { a = $.el('a', {
@ -13253,6 +13293,7 @@
selector = (function() { selector = (function() {
switch (g.VIEW) { switch (g.VIEW) {
case 'thread': case 'thread':
case 'archive':
return '.navLinks.desktop > a'; return '.navLinks.desktop > a';
case 'catalog': case 'catalog':
return '.navLinks > :first-child > a'; return '.navLinks > :first-child > a';
@ -13645,7 +13686,8 @@
FileInfo = { FileInfo = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['File Info Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['File Info Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13763,7 +13805,8 @@
Fourchan = { Fourchan = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
if (g.BOARD.ID === 'g') { if (g.BOARD.ID === 'g') {
@ -13823,7 +13866,8 @@
IDColor = { IDColor = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
return; return;
} }
this.ids = {}; this.ids = {};
@ -13871,7 +13915,8 @@
IDHighlight = { IDHighlight = {
init: function() { init: function() {
if (g.VIEW === 'catalog') { var _ref;
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -13931,7 +13976,7 @@
return Conf[hotkey] = key; return Conf[hotkey] = key;
}, },
keydown: function(e) { keydown: function(e) {
var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2; var form, key, notification, notifications, op, searchInput, target, thread, threadRoot, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (!(key = Keybinds.keyCode(e))) { if (!(key = Keybinds.keyCode(e))) {
return; return;
} }
@ -13941,7 +13986,7 @@
return; return;
} }
} }
if (!(g.VIEW === 'catalog' || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) { if (!(((_ref1 = g.VIEW) !== 'index' && _ref1 !== 'thread') || g.VIEW === 'index' && Conf['JSON Navigation'] && Conf['Index Mode'] === 'catalog')) {
threadRoot = Nav.getThread(); threadRoot = Nav.getThread();
if (op = $('.op', threadRoot)) { if (op = $('.op', threadRoot)) {
thread = Get.postFromNode(op).thread; thread = Get.postFromNode(op).thread;
@ -14064,19 +14109,19 @@
Keybinds.img(threadRoot, true); Keybinds.img(threadRoot, true);
break; break;
case Conf['Open Gallery']: case Conf['Open Gallery']:
if (g.VIEW === 'catalog') { if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
return; return;
} }
Gallery.cb.toggle(); Gallery.cb.toggle();
break; break;
case Conf['fappeTyme']: case Conf['fappeTyme']:
if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Fappe Tyme'] || ((_ref3 = g.VIEW) !== 'index' && _ref3 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('fappe'); FappeTyme.toggle('fappe');
break; break;
case Conf['werkTyme']: case Conf['werkTyme']:
if (!Conf['Werk Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { if (!Conf['Werk Tyme'] || ((_ref4 = g.VIEW) !== 'index' && _ref4 !== 'thread') || g.BOARD === 'f') {
return; return;
} }
FappeTyme.toggle('werk'); FappeTyme.toggle('werk');
@ -14096,7 +14141,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') { if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
return; return;
} }
$('.next button', Index.pagelist).click(); $('.next button', Index.pagelist).click();
@ -14111,7 +14156,7 @@
return; return;
} }
if (Conf['JSON Navigation']) { if (Conf['JSON Navigation']) {
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') { if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
return; return;
} }
$('.prev button', Index.pagelist).click(); $('.prev button', Index.pagelist).click();
@ -14460,7 +14505,8 @@
RelativeDates = { RelativeDates = {
INTERVAL: $.MINUTE / 2, INTERVAL: $.MINUTE / 2,
init: function() { init: function() {
if (g.VIEW !== 'catalog' && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') { var _ref;
if (((_ref = g.VIEW) === 'index' || _ref === 'thread') && Conf['Relative Post Dates'] && !Conf['Relative Date Title'] || g.VIEW === 'index' && Conf['JSON Navigation'] && g.BOARD.ID !== 'f') {
this.flush(); this.flush();
$.on(d, 'visibilitychange ThreadUpdate', this.flush); $.on(d, 'visibilitychange ThreadUpdate', this.flush);
} }
@ -14566,14 +14612,22 @@
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
return CatalogThread.callbacks.push({ CatalogThread.callbacks.push({
name: 'Reveal Spoilers', name: 'Reveal Spoilers',
cb: this.node cb: this.node
}); });
if (g.VIEW === 'archive') {
return $.ready(function() {
return RemoveSpoilers.unspoiler($.id('arc-list'));
});
}
}, },
node: function(post) { node: function(post) {
return RemoveSpoilers.unspoiler(this.nodes.comment);
},
unspoiler: function(el) {
var span, spoiler, spoilers, _i, _len; var span, spoiler, spoilers, _i, _len;
spoilers = $$('s', this.nodes.comment); spoilers = $$('s', el);
for (_i = 0, _len = spoilers.length; _i < _len; _i++) { for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
spoiler = spoilers[_i]; spoiler = spoilers[_i];
span = $.el('span', { span = $.el('span', {
@ -14587,7 +14641,8 @@
Time = { Time = {
init: function() { init: function() {
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) { var _ref;
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
return; return;
} }
return Post.callbacks.push({ return Post.callbacks.push({
@ -15379,6 +15434,8 @@
return 'thread'; return 'thread';
case 'catalog': case 'catalog':
return 'catalog'; return 'catalog';
case 'archive':
return 'archive';
default: default:
return 'index'; return 'index';
} }

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'> <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'> <app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.18.8' /> <updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.18.9' />
</app> </app>
</gupdate> </gupdate>

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'> <gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'> <app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.18.8' /> <updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.18.9' />
</app> </app>
</gupdate> </gupdate>

View File

@ -3,7 +3,7 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.", "description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": { "meta": {
"name": "4chan X", "name": "4chan X",
"version": "1.9.18.8", "version": "1.9.18.9",
"repo": "https://github.com/ccd0/4chan-x/", "repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x", "page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/", "downloads": "https://ccd0.github.io/4chan-x/builds/",