Release 4chan X v1.9.18.9.
This commit is contained in:
parent
353b930eb7
commit
87d4959a98
@ -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).
|
||||
|
||||
<!-- 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
|
||||
*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")]
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.9.18.8
|
||||
* 4chan X - Version 1.9.18.9
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.9.18.8
|
||||
// @version 1.9.18.9
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X beta
|
||||
// @version 1.9.18.8
|
||||
// @version 1.9.18.9
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -25,7 +25,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.9.18.8
|
||||
* 4chan X - Version 1.9.18.9
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -395,7 +395,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.9.18.8',
|
||||
VERSION: '1.9.18.9',
|
||||
NAMESPACE: '4chan X.',
|
||||
NAME: '4chan X',
|
||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||
@ -2669,10 +2669,13 @@
|
||||
className: '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> — <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> — <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();
|
||||
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
|
||||
if (g.BOARD.ID === 'b') {
|
||||
$('.archlistlink', this.navLinks).hidden = true;
|
||||
}
|
||||
this.searchInput = $('#index-search', this.navLinks);
|
||||
this.hideLabel = $('#hidden-label', this.navLinks);
|
||||
this.selectMode = $('#index-mode', this.navLinks);
|
||||
@ -4811,9 +4814,13 @@
|
||||
|
||||
Anonymize = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Anonymize']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
|
||||
return;
|
||||
}
|
||||
if (g.VIEW === 'archive') {
|
||||
return this.archive();
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
name: 'Anonymize',
|
||||
cb: this.node
|
||||
@ -4836,14 +4843,31 @@
|
||||
$.replace(email, name);
|
||||
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 = {
|
||||
filters: {},
|
||||
init: function() {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
||||
if (g.VIEW === 'catalog' || !Conf['Filter']) {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
if (!Conf['Filtered Backlinks']) {
|
||||
@ -4851,9 +4875,9 @@
|
||||
}
|
||||
for (key in Config.filter) {
|
||||
this.filters[key] = [];
|
||||
_ref = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
line = _ref[_i];
|
||||
_ref1 = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
line = _ref1[_i];
|
||||
if (line[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
@ -4861,8 +4885,8 @@
|
||||
continue;
|
||||
}
|
||||
filter = line.replace(regexp[0], '');
|
||||
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global';
|
||||
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 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;
|
||||
}
|
||||
if (key === 'uniqueID' || key === 'MD5') {
|
||||
@ -4876,10 +4900,10 @@
|
||||
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() {
|
||||
var _ref4;
|
||||
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) {
|
||||
var _ref5;
|
||||
switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
|
||||
case 'yes':
|
||||
return true;
|
||||
case 'no':
|
||||
@ -4889,8 +4913,8 @@
|
||||
}
|
||||
})();
|
||||
if (hl = /highlight/.test(filter)) {
|
||||
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';
|
||||
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';
|
||||
top = top === 'yes';
|
||||
}
|
||||
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
|
||||
@ -5036,8 +5060,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5052,9 +5076,9 @@
|
||||
},
|
||||
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']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_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 = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -5111,7 +5135,8 @@
|
||||
|
||||
PostHiding = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Reply Hiding Buttons']) {
|
||||
@ -5147,8 +5172,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5407,7 +5432,8 @@
|
||||
Recursive = {
|
||||
recursives: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -5470,7 +5496,8 @@
|
||||
|
||||
ThreadHiding = {
|
||||
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;
|
||||
}
|
||||
this.db = new DataBoard('hiddenThreads');
|
||||
@ -5742,7 +5769,8 @@
|
||||
QuoteBacklink = {
|
||||
containers: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
|
||||
return;
|
||||
}
|
||||
Post.callbacks.push({
|
||||
@ -5827,7 +5855,8 @@
|
||||
|
||||
QuoteCT = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -5864,7 +5893,8 @@
|
||||
|
||||
QuoteInline = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
|
||||
return;
|
||||
}
|
||||
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
|
||||
@ -5983,7 +6013,8 @@
|
||||
|
||||
QuoteOP = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6026,7 +6057,8 @@
|
||||
|
||||
QuotePreview = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6109,7 +6141,8 @@
|
||||
|
||||
QuoteStrikeThrough = {
|
||||
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 Post.callbacks.push({
|
||||
@ -6313,7 +6346,8 @@
|
||||
|
||||
QuoteYou = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
@ -6402,7 +6436,8 @@
|
||||
|
||||
Quotify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -8728,8 +8763,8 @@
|
||||
|
||||
FappeTyme = {
|
||||
init: function() {
|
||||
var el, lc, type, _i, _len, _ref;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') {
|
||||
var el, lc, type, _i, _len, _ref, _ref1;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
|
||||
return;
|
||||
}
|
||||
this.nodes = {};
|
||||
@ -8737,9 +8772,9 @@
|
||||
fappe: false,
|
||||
werk: Conf['werk']
|
||||
};
|
||||
_ref = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
if (!Conf["" + type + " Tyme"]) {
|
||||
continue;
|
||||
}
|
||||
@ -8800,8 +8835,8 @@
|
||||
|
||||
Gallery = {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
this.delay = Conf['Slide Delay'];
|
||||
@ -9188,8 +9223,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9348,7 +9383,8 @@
|
||||
|
||||
ImageExpand = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
this.EAI = $.el('a', {
|
||||
@ -9711,8 +9747,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9721,9 +9757,9 @@
|
||||
});
|
||||
createSubEntry = ImageExpand.menu.createSubEntry;
|
||||
subEntries = [];
|
||||
_ref = Config.imageExpansion;
|
||||
for (name in _ref) {
|
||||
conf = _ref[name];
|
||||
_ref1 = Config.imageExpansion;
|
||||
for (name in _ref1) {
|
||||
conf = _ref1[name];
|
||||
subEntries.push(createSubEntry(name, conf[1]));
|
||||
}
|
||||
return Header.menu.addEntry({
|
||||
@ -9751,7 +9787,8 @@
|
||||
|
||||
ImageHover = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (Conf['Image Hover']) {
|
||||
@ -9867,8 +9904,8 @@
|
||||
|
||||
ImageLoader = {
|
||||
init: function() {
|
||||
var prefetch;
|
||||
if (g.VIEW === 'catalog') {
|
||||
var prefetch, _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
|
||||
@ -9883,14 +9920,14 @@
|
||||
});
|
||||
if (Conf['Replace WEBM']) {
|
||||
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
|
||||
var qpClone, _ref;
|
||||
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0;
|
||||
var qpClone, _ref1;
|
||||
qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
|
||||
return g.posts.forEach(function(post) {
|
||||
var thumb, _i, _len, _ref1, _ref2;
|
||||
_ref1 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
post = _ref1[_i];
|
||||
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) {
|
||||
var thumb, _i, _len, _ref2, _ref3;
|
||||
_ref2 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||
post = _ref2[_i];
|
||||
if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
|
||||
continue;
|
||||
}
|
||||
thumb = post.file.thumb;
|
||||
@ -10004,7 +10041,8 @@
|
||||
|
||||
RevealSpoilers = {
|
||||
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 Post.callbacks.push({
|
||||
@ -10025,14 +10063,14 @@
|
||||
|
||||
Sauce = {
|
||||
init: function() {
|
||||
var err, link, links, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Sauce']) {
|
||||
var err, link, links, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
|
||||
return;
|
||||
}
|
||||
links = [];
|
||||
_ref = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
link = _ref[_i];
|
||||
_ref1 = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
link = _ref1[_i];
|
||||
try {
|
||||
if (link[0] !== '#') {
|
||||
links.push(link.trim());
|
||||
@ -10773,7 +10811,8 @@
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -10913,8 +10952,8 @@
|
||||
|
||||
ArchiveLink = {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -10934,9 +10973,9 @@
|
||||
},
|
||||
subEntries: []
|
||||
};
|
||||
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -10979,8 +11018,8 @@
|
||||
|
||||
DeleteLink = {
|
||||
init: function() {
|
||||
var div, fileEl, fileEntry, postEl, postEntry;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
var div, fileEl, fileEntry, postEl, postEntry, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -11117,8 +11156,8 @@
|
||||
|
||||
DownloadLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -11160,7 +11199,8 @@
|
||||
|
||||
Menu = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
|
||||
return;
|
||||
}
|
||||
this.button = $.el('a', {
|
||||
@ -11201,8 +11241,8 @@
|
||||
|
||||
ReportLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -13253,6 +13293,7 @@
|
||||
selector = (function() {
|
||||
switch (g.VIEW) {
|
||||
case 'thread':
|
||||
case 'archive':
|
||||
return '.navLinks.desktop > a';
|
||||
case 'catalog':
|
||||
return '.navLinks > :first-child > a';
|
||||
@ -13645,7 +13686,8 @@
|
||||
|
||||
FileInfo = {
|
||||
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 Post.callbacks.push({
|
||||
@ -13763,7 +13805,8 @@
|
||||
|
||||
Fourchan = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (g.BOARD.ID === 'g') {
|
||||
@ -13823,7 +13866,8 @@
|
||||
|
||||
IDColor = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
|
||||
return;
|
||||
}
|
||||
this.ids = {};
|
||||
@ -13871,7 +13915,8 @@
|
||||
|
||||
IDHighlight = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -13931,7 +13976,7 @@
|
||||
return Conf[hotkey] = key;
|
||||
},
|
||||
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))) {
|
||||
return;
|
||||
}
|
||||
@ -13941,7 +13986,7 @@
|
||||
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();
|
||||
if (op = $('.op', threadRoot)) {
|
||||
thread = Get.postFromNode(op).thread;
|
||||
@ -14064,19 +14109,19 @@
|
||||
Keybinds.img(threadRoot, true);
|
||||
break;
|
||||
case Conf['Open Gallery']:
|
||||
if (g.VIEW === 'catalog') {
|
||||
if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
|
||||
return;
|
||||
}
|
||||
Gallery.cb.toggle();
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('fappe');
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('werk');
|
||||
@ -14096,7 +14141,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') {
|
||||
if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.next button', Index.pagelist).click();
|
||||
@ -14111,7 +14156,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') {
|
||||
if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.prev button', Index.pagelist).click();
|
||||
@ -14460,7 +14505,8 @@
|
||||
RelativeDates = {
|
||||
INTERVAL: $.MINUTE / 2,
|
||||
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();
|
||||
$.on(d, 'visibilitychange ThreadUpdate', this.flush);
|
||||
}
|
||||
@ -14566,14 +14612,22 @@
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
return CatalogThread.callbacks.push({
|
||||
CatalogThread.callbacks.push({
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
if (g.VIEW === 'archive') {
|
||||
return $.ready(function() {
|
||||
return RemoveSpoilers.unspoiler($.id('arc-list'));
|
||||
});
|
||||
}
|
||||
},
|
||||
node: function(post) {
|
||||
return RemoveSpoilers.unspoiler(this.nodes.comment);
|
||||
},
|
||||
unspoiler: function(el) {
|
||||
var span, spoiler, spoilers, _i, _len;
|
||||
spoilers = $$('s', this.nodes.comment);
|
||||
spoilers = $$('s', el);
|
||||
for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
|
||||
spoiler = spoilers[_i];
|
||||
span = $.el('span', {
|
||||
@ -14587,7 +14641,8 @@
|
||||
|
||||
Time = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -15379,6 +15434,8 @@
|
||||
return 'thread';
|
||||
case 'catalog':
|
||||
return 'catalog';
|
||||
case 'archive':
|
||||
return 'archive';
|
||||
default:
|
||||
return 'index';
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.9.18.8
|
||||
// @version 1.9.18.9
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -24,7 +24,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.9.18.8
|
||||
* 4chan X - Version 1.9.18.9
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -394,7 +394,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.9.18.8',
|
||||
VERSION: '1.9.18.9',
|
||||
NAMESPACE: '4chan X.',
|
||||
NAME: '4chan X',
|
||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||
@ -2668,10 +2668,13 @@
|
||||
className: '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> — <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> — <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();
|
||||
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
|
||||
if (g.BOARD.ID === 'b') {
|
||||
$('.archlistlink', this.navLinks).hidden = true;
|
||||
}
|
||||
this.searchInput = $('#index-search', this.navLinks);
|
||||
this.hideLabel = $('#hidden-label', this.navLinks);
|
||||
this.selectMode = $('#index-mode', this.navLinks);
|
||||
@ -4810,9 +4813,13 @@
|
||||
|
||||
Anonymize = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Anonymize']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
|
||||
return;
|
||||
}
|
||||
if (g.VIEW === 'archive') {
|
||||
return this.archive();
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
name: 'Anonymize',
|
||||
cb: this.node
|
||||
@ -4835,14 +4842,31 @@
|
||||
$.replace(email, name);
|
||||
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 = {
|
||||
filters: {},
|
||||
init: function() {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
||||
if (g.VIEW === 'catalog' || !Conf['Filter']) {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
if (!Conf['Filtered Backlinks']) {
|
||||
@ -4850,9 +4874,9 @@
|
||||
}
|
||||
for (key in Config.filter) {
|
||||
this.filters[key] = [];
|
||||
_ref = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
line = _ref[_i];
|
||||
_ref1 = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
line = _ref1[_i];
|
||||
if (line[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
@ -4860,8 +4884,8 @@
|
||||
continue;
|
||||
}
|
||||
filter = line.replace(regexp[0], '');
|
||||
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global';
|
||||
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 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;
|
||||
}
|
||||
if (key === 'uniqueID' || key === 'MD5') {
|
||||
@ -4875,10 +4899,10 @@
|
||||
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() {
|
||||
var _ref4;
|
||||
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) {
|
||||
var _ref5;
|
||||
switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
|
||||
case 'yes':
|
||||
return true;
|
||||
case 'no':
|
||||
@ -4888,8 +4912,8 @@
|
||||
}
|
||||
})();
|
||||
if (hl = /highlight/.test(filter)) {
|
||||
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';
|
||||
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';
|
||||
top = top === 'yes';
|
||||
}
|
||||
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
|
||||
@ -5035,8 +5059,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5051,9 +5075,9 @@
|
||||
},
|
||||
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']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_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 = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -5110,7 +5134,8 @@
|
||||
|
||||
PostHiding = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Reply Hiding Buttons']) {
|
||||
@ -5146,8 +5171,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5406,7 +5431,8 @@
|
||||
Recursive = {
|
||||
recursives: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -5469,7 +5495,8 @@
|
||||
|
||||
ThreadHiding = {
|
||||
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;
|
||||
}
|
||||
this.db = new DataBoard('hiddenThreads');
|
||||
@ -5741,7 +5768,8 @@
|
||||
QuoteBacklink = {
|
||||
containers: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
|
||||
return;
|
||||
}
|
||||
Post.callbacks.push({
|
||||
@ -5826,7 +5854,8 @@
|
||||
|
||||
QuoteCT = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -5863,7 +5892,8 @@
|
||||
|
||||
QuoteInline = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
|
||||
return;
|
||||
}
|
||||
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
|
||||
@ -5982,7 +6012,8 @@
|
||||
|
||||
QuoteOP = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6025,7 +6056,8 @@
|
||||
|
||||
QuotePreview = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6108,7 +6140,8 @@
|
||||
|
||||
QuoteStrikeThrough = {
|
||||
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 Post.callbacks.push({
|
||||
@ -6312,7 +6345,8 @@
|
||||
|
||||
QuoteYou = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
@ -6401,7 +6435,8 @@
|
||||
|
||||
Quotify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -8727,8 +8762,8 @@
|
||||
|
||||
FappeTyme = {
|
||||
init: function() {
|
||||
var el, lc, type, _i, _len, _ref;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') {
|
||||
var el, lc, type, _i, _len, _ref, _ref1;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
|
||||
return;
|
||||
}
|
||||
this.nodes = {};
|
||||
@ -8736,9 +8771,9 @@
|
||||
fappe: false,
|
||||
werk: Conf['werk']
|
||||
};
|
||||
_ref = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
if (!Conf["" + type + " Tyme"]) {
|
||||
continue;
|
||||
}
|
||||
@ -8799,8 +8834,8 @@
|
||||
|
||||
Gallery = {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
this.delay = Conf['Slide Delay'];
|
||||
@ -9187,8 +9222,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9347,7 +9382,8 @@
|
||||
|
||||
ImageExpand = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
this.EAI = $.el('a', {
|
||||
@ -9710,8 +9746,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9720,9 +9756,9 @@
|
||||
});
|
||||
createSubEntry = ImageExpand.menu.createSubEntry;
|
||||
subEntries = [];
|
||||
_ref = Config.imageExpansion;
|
||||
for (name in _ref) {
|
||||
conf = _ref[name];
|
||||
_ref1 = Config.imageExpansion;
|
||||
for (name in _ref1) {
|
||||
conf = _ref1[name];
|
||||
subEntries.push(createSubEntry(name, conf[1]));
|
||||
}
|
||||
return Header.menu.addEntry({
|
||||
@ -9750,7 +9786,8 @@
|
||||
|
||||
ImageHover = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (Conf['Image Hover']) {
|
||||
@ -9866,8 +9903,8 @@
|
||||
|
||||
ImageLoader = {
|
||||
init: function() {
|
||||
var prefetch;
|
||||
if (g.VIEW === 'catalog') {
|
||||
var prefetch, _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
|
||||
@ -9882,14 +9919,14 @@
|
||||
});
|
||||
if (Conf['Replace WEBM']) {
|
||||
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
|
||||
var qpClone, _ref;
|
||||
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0;
|
||||
var qpClone, _ref1;
|
||||
qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
|
||||
return g.posts.forEach(function(post) {
|
||||
var thumb, _i, _len, _ref1, _ref2;
|
||||
_ref1 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
post = _ref1[_i];
|
||||
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) {
|
||||
var thumb, _i, _len, _ref2, _ref3;
|
||||
_ref2 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||
post = _ref2[_i];
|
||||
if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
|
||||
continue;
|
||||
}
|
||||
thumb = post.file.thumb;
|
||||
@ -10003,7 +10040,8 @@
|
||||
|
||||
RevealSpoilers = {
|
||||
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 Post.callbacks.push({
|
||||
@ -10024,14 +10062,14 @@
|
||||
|
||||
Sauce = {
|
||||
init: function() {
|
||||
var err, link, links, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Sauce']) {
|
||||
var err, link, links, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
|
||||
return;
|
||||
}
|
||||
links = [];
|
||||
_ref = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
link = _ref[_i];
|
||||
_ref1 = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
link = _ref1[_i];
|
||||
try {
|
||||
if (link[0] !== '#') {
|
||||
links.push(link.trim());
|
||||
@ -10772,7 +10810,8 @@
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -10912,8 +10951,8 @@
|
||||
|
||||
ArchiveLink = {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -10933,9 +10972,9 @@
|
||||
},
|
||||
subEntries: []
|
||||
};
|
||||
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -10978,8 +11017,8 @@
|
||||
|
||||
DeleteLink = {
|
||||
init: function() {
|
||||
var div, fileEl, fileEntry, postEl, postEntry;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
var div, fileEl, fileEntry, postEl, postEntry, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -11116,8 +11155,8 @@
|
||||
|
||||
DownloadLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -11159,7 +11198,8 @@
|
||||
|
||||
Menu = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
|
||||
return;
|
||||
}
|
||||
this.button = $.el('a', {
|
||||
@ -11200,8 +11240,8 @@
|
||||
|
||||
ReportLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -13252,6 +13292,7 @@
|
||||
selector = (function() {
|
||||
switch (g.VIEW) {
|
||||
case 'thread':
|
||||
case 'archive':
|
||||
return '.navLinks.desktop > a';
|
||||
case 'catalog':
|
||||
return '.navLinks > :first-child > a';
|
||||
@ -13644,7 +13685,8 @@
|
||||
|
||||
FileInfo = {
|
||||
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 Post.callbacks.push({
|
||||
@ -13762,7 +13804,8 @@
|
||||
|
||||
Fourchan = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (g.BOARD.ID === 'g') {
|
||||
@ -13822,7 +13865,8 @@
|
||||
|
||||
IDColor = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
|
||||
return;
|
||||
}
|
||||
this.ids = {};
|
||||
@ -13870,7 +13914,8 @@
|
||||
|
||||
IDHighlight = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -13930,7 +13975,7 @@
|
||||
return Conf[hotkey] = key;
|
||||
},
|
||||
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))) {
|
||||
return;
|
||||
}
|
||||
@ -13940,7 +13985,7 @@
|
||||
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();
|
||||
if (op = $('.op', threadRoot)) {
|
||||
thread = Get.postFromNode(op).thread;
|
||||
@ -14063,19 +14108,19 @@
|
||||
Keybinds.img(threadRoot, true);
|
||||
break;
|
||||
case Conf['Open Gallery']:
|
||||
if (g.VIEW === 'catalog') {
|
||||
if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
|
||||
return;
|
||||
}
|
||||
Gallery.cb.toggle();
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('fappe');
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('werk');
|
||||
@ -14095,7 +14140,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') {
|
||||
if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.next button', Index.pagelist).click();
|
||||
@ -14110,7 +14155,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') {
|
||||
if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.prev button', Index.pagelist).click();
|
||||
@ -14459,7 +14504,8 @@
|
||||
RelativeDates = {
|
||||
INTERVAL: $.MINUTE / 2,
|
||||
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();
|
||||
$.on(d, 'visibilitychange ThreadUpdate', this.flush);
|
||||
}
|
||||
@ -14565,14 +14611,22 @@
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
return CatalogThread.callbacks.push({
|
||||
CatalogThread.callbacks.push({
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
if (g.VIEW === 'archive') {
|
||||
return $.ready(function() {
|
||||
return RemoveSpoilers.unspoiler($.id('arc-list'));
|
||||
});
|
||||
}
|
||||
},
|
||||
node: function(post) {
|
||||
return RemoveSpoilers.unspoiler(this.nodes.comment);
|
||||
},
|
||||
unspoiler: function(el) {
|
||||
var span, spoiler, spoilers, _i, _len;
|
||||
spoilers = $$('s', this.nodes.comment);
|
||||
spoilers = $$('s', el);
|
||||
for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
|
||||
spoiler = spoilers[_i];
|
||||
span = $.el('span', {
|
||||
@ -14586,7 +14640,8 @@
|
||||
|
||||
Time = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -15378,6 +15433,8 @@
|
||||
return 'thread';
|
||||
case 'catalog':
|
||||
return 'catalog';
|
||||
case 'archive':
|
||||
return 'archive';
|
||||
default:
|
||||
return 'index';
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.9.18.8
|
||||
// @version 1.9.18.9
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.9.18.8
|
||||
// @version 1.9.18.9
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -25,7 +25,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.9.18.8
|
||||
* 4chan X - Version 1.9.18.9
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -395,7 +395,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.9.18.8',
|
||||
VERSION: '1.9.18.9',
|
||||
NAMESPACE: '4chan X.',
|
||||
NAME: '4chan X',
|
||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||
@ -2669,10 +2669,13 @@
|
||||
className: '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> — <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> — <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();
|
||||
$('.cataloglink a', this.navLinks).href = CatalogLinks.catalog();
|
||||
if (g.BOARD.ID === 'b') {
|
||||
$('.archlistlink', this.navLinks).hidden = true;
|
||||
}
|
||||
this.searchInput = $('#index-search', this.navLinks);
|
||||
this.hideLabel = $('#hidden-label', this.navLinks);
|
||||
this.selectMode = $('#index-mode', this.navLinks);
|
||||
@ -4811,9 +4814,13 @@
|
||||
|
||||
Anonymize = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Anonymize']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread' && _ref !== 'archive') || !Conf['Anonymize']) {
|
||||
return;
|
||||
}
|
||||
if (g.VIEW === 'archive') {
|
||||
return this.archive();
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
name: 'Anonymize',
|
||||
cb: this.node
|
||||
@ -4836,14 +4843,31 @@
|
||||
$.replace(email, name);
|
||||
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 = {
|
||||
filters: {},
|
||||
init: function() {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
||||
if (g.VIEW === 'catalog' || !Conf['Filter']) {
|
||||
var boards, err, filter, hl, key, line, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
if (!Conf['Filtered Backlinks']) {
|
||||
@ -4851,9 +4875,9 @@
|
||||
}
|
||||
for (key in Config.filter) {
|
||||
this.filters[key] = [];
|
||||
_ref = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
line = _ref[_i];
|
||||
_ref1 = Conf[key].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
line = _ref1[_i];
|
||||
if (line[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
@ -4861,8 +4885,8 @@
|
||||
continue;
|
||||
}
|
||||
filter = line.replace(regexp[0], '');
|
||||
boards = ((_ref1 = filter.match(/boards:([^;]+)/)) != null ? _ref1[1].toLowerCase() : void 0) || 'global';
|
||||
if (boards !== 'global' && (_ref2 = g.BOARD.ID, __indexOf.call(boards.split(','), _ref2) < 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;
|
||||
}
|
||||
if (key === 'uniqueID' || key === 'MD5') {
|
||||
@ -4876,10 +4900,10 @@
|
||||
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() {
|
||||
var _ref4;
|
||||
switch ((_ref4 = filter.match(/stub:(yes|no)/)) != null ? _ref4[1] : void 0) {
|
||||
var _ref5;
|
||||
switch ((_ref5 = filter.match(/stub:(yes|no)/)) != null ? _ref5[1] : void 0) {
|
||||
case 'yes':
|
||||
return true;
|
||||
case 'no':
|
||||
@ -4889,8 +4913,8 @@
|
||||
}
|
||||
})();
|
||||
if (hl = /highlight/.test(filter)) {
|
||||
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';
|
||||
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';
|
||||
top = top === 'yes';
|
||||
}
|
||||
this.filters[key].push(this.createFilter(regexp, op, stub, hl, top));
|
||||
@ -5036,8 +5060,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Filter']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5052,9 +5076,9 @@
|
||||
},
|
||||
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']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_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 = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(Filter.menu.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -5111,7 +5135,8 @@
|
||||
|
||||
PostHiding = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Reply Hiding Buttons']) {
|
||||
@ -5147,8 +5172,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
var apply, div, hideStubLink, makeStub, replies, thisPost, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Reply Hiding Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -5407,7 +5432,8 @@
|
||||
Recursive = {
|
||||
recursives: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -5470,7 +5496,8 @@
|
||||
|
||||
ThreadHiding = {
|
||||
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;
|
||||
}
|
||||
this.db = new DataBoard('hiddenThreads');
|
||||
@ -5742,7 +5769,8 @@
|
||||
QuoteBacklink = {
|
||||
containers: {},
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Backlinks']) {
|
||||
return;
|
||||
}
|
||||
Post.callbacks.push({
|
||||
@ -5827,7 +5855,8 @@
|
||||
|
||||
QuoteCT = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -5864,7 +5893,8 @@
|
||||
|
||||
QuoteInline = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Inlining']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Inlining']) {
|
||||
return;
|
||||
}
|
||||
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
|
||||
@ -5983,7 +6013,8 @@
|
||||
|
||||
QuoteOP = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark OP Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Mark OP Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6026,7 +6057,8 @@
|
||||
|
||||
QuotePreview = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Quote Previewing']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Quote Previewing']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -6109,7 +6141,8 @@
|
||||
|
||||
QuoteStrikeThrough = {
|
||||
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 Post.callbacks.push({
|
||||
@ -6313,7 +6346,8 @@
|
||||
|
||||
QuoteYou = {
|
||||
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;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
@ -6402,7 +6436,8 @@
|
||||
|
||||
Quotify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Resurrect Quotes']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Resurrect Quotes']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -8728,8 +8763,8 @@
|
||||
|
||||
FappeTyme = {
|
||||
init: function() {
|
||||
var el, lc, type, _i, _len, _ref;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || g.VIEW === 'catalog' || g.BOARD === 'f') {
|
||||
var el, lc, type, _i, _len, _ref, _ref1;
|
||||
if (!(Conf['Fappe Tyme'] || Conf['Werk Tyme']) || ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f') {
|
||||
return;
|
||||
}
|
||||
this.nodes = {};
|
||||
@ -8737,9 +8772,9 @@
|
||||
fappe: false,
|
||||
werk: Conf['werk']
|
||||
};
|
||||
_ref = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = ["Fappe", "Werk"];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
if (!Conf["" + type + " Tyme"]) {
|
||||
continue;
|
||||
}
|
||||
@ -8800,8 +8835,8 @@
|
||||
|
||||
Gallery = {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || g.BOARD === 'f' || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
this.delay = Conf['Slide Delay'];
|
||||
@ -9188,8 +9223,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var el;
|
||||
if (g.VIEW === 'catalog' || !Conf['Gallery']) {
|
||||
var el, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Gallery']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9348,7 +9383,8 @@
|
||||
|
||||
ImageExpand = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
this.EAI = $.el('a', {
|
||||
@ -9711,8 +9747,8 @@
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Image Expansion']) {
|
||||
var conf, createSubEntry, el, name, subEntries, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Image Expansion']) {
|
||||
return;
|
||||
}
|
||||
el = $.el('span', {
|
||||
@ -9721,9 +9757,9 @@
|
||||
});
|
||||
createSubEntry = ImageExpand.menu.createSubEntry;
|
||||
subEntries = [];
|
||||
_ref = Config.imageExpansion;
|
||||
for (name in _ref) {
|
||||
conf = _ref[name];
|
||||
_ref1 = Config.imageExpansion;
|
||||
for (name in _ref1) {
|
||||
conf = _ref1[name];
|
||||
subEntries.push(createSubEntry(name, conf[1]));
|
||||
}
|
||||
return Header.menu.addEntry({
|
||||
@ -9751,7 +9787,8 @@
|
||||
|
||||
ImageHover = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (Conf['Image Hover']) {
|
||||
@ -9867,8 +9904,8 @@
|
||||
|
||||
ImageLoader = {
|
||||
init: function() {
|
||||
var prefetch;
|
||||
if (g.VIEW === 'catalog') {
|
||||
var prefetch, _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (!(Conf['Image Prefetching'] || Conf['Replace JPG'] || Conf['Replace PNG'] || Conf['Replace GIF'] || Conf['Replace WEBM'])) {
|
||||
@ -9883,14 +9920,14 @@
|
||||
});
|
||||
if (Conf['Replace WEBM']) {
|
||||
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', function() {
|
||||
var qpClone, _ref;
|
||||
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0;
|
||||
var qpClone, _ref1;
|
||||
qpClone = (_ref1 = $.id('qp')) != null ? _ref1.firstElementChild : void 0;
|
||||
return g.posts.forEach(function(post) {
|
||||
var thumb, _i, _len, _ref1, _ref2;
|
||||
_ref1 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
post = _ref1[_i];
|
||||
if (!((_ref2 = post.file) != null ? _ref2.videoThumb : void 0)) {
|
||||
var thumb, _i, _len, _ref2, _ref3;
|
||||
_ref2 = [post].concat(__slice.call(post.clones));
|
||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||
post = _ref2[_i];
|
||||
if (!((_ref3 = post.file) != null ? _ref3.videoThumb : void 0)) {
|
||||
continue;
|
||||
}
|
||||
thumb = post.file.thumb;
|
||||
@ -10004,7 +10041,8 @@
|
||||
|
||||
RevealSpoilers = {
|
||||
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 Post.callbacks.push({
|
||||
@ -10025,14 +10063,14 @@
|
||||
|
||||
Sauce = {
|
||||
init: function() {
|
||||
var err, link, links, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Sauce']) {
|
||||
var err, link, links, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Sauce']) {
|
||||
return;
|
||||
}
|
||||
links = [];
|
||||
_ref = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
link = _ref[_i];
|
||||
_ref1 = Conf['sauces'].split('\n');
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
link = _ref1[_i];
|
||||
try {
|
||||
if (link[0] !== '#') {
|
||||
links.push(link.trim());
|
||||
@ -10773,7 +10811,8 @@
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Linkify']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
@ -10913,8 +10952,8 @@
|
||||
|
||||
ArchiveLink = {
|
||||
init: function() {
|
||||
var div, entry, type, _i, _len, _ref;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
var div, entry, type, _i, _len, _ref, _ref1;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Archive Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -10934,9 +10973,9 @@
|
||||
},
|
||||
subEntries: []
|
||||
};
|
||||
_ref = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
_ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
type = _ref1[_i];
|
||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||
}
|
||||
return Menu.menu.addEntry(entry);
|
||||
@ -10979,8 +11018,8 @@
|
||||
|
||||
DeleteLink = {
|
||||
init: function() {
|
||||
var div, fileEl, fileEntry, postEl, postEntry;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
var div, fileEl, fileEntry, postEl, postEntry, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Delete Link']) {
|
||||
return;
|
||||
}
|
||||
div = $.el('div', {
|
||||
@ -11117,8 +11156,8 @@
|
||||
|
||||
DownloadLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Download Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -11160,7 +11199,8 @@
|
||||
|
||||
Menu = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu']) {
|
||||
return;
|
||||
}
|
||||
this.button = $.el('a', {
|
||||
@ -11201,8 +11241,8 @@
|
||||
|
||||
ReportLink = {
|
||||
init: function() {
|
||||
var a;
|
||||
if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
var a, _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Menu'] || !Conf['Report Link']) {
|
||||
return;
|
||||
}
|
||||
a = $.el('a', {
|
||||
@ -13253,6 +13293,7 @@
|
||||
selector = (function() {
|
||||
switch (g.VIEW) {
|
||||
case 'thread':
|
||||
case 'archive':
|
||||
return '.navLinks.desktop > a';
|
||||
case 'catalog':
|
||||
return '.navLinks > :first-child > a';
|
||||
@ -13645,7 +13686,8 @@
|
||||
|
||||
FileInfo = {
|
||||
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 Post.callbacks.push({
|
||||
@ -13763,7 +13805,8 @@
|
||||
|
||||
Fourchan = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
if (g.BOARD.ID === 'g') {
|
||||
@ -13823,7 +13866,8 @@
|
||||
|
||||
IDColor = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Color User IDs']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Color User IDs']) {
|
||||
return;
|
||||
}
|
||||
this.ids = {};
|
||||
@ -13871,7 +13915,8 @@
|
||||
|
||||
IDHighlight = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog') {
|
||||
var _ref;
|
||||
if ((_ref = g.VIEW) !== 'index' && _ref !== 'thread') {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -13931,7 +13976,7 @@
|
||||
return Conf[hotkey] = key;
|
||||
},
|
||||
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))) {
|
||||
return;
|
||||
}
|
||||
@ -13941,7 +13986,7 @@
|
||||
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();
|
||||
if (op = $('.op', threadRoot)) {
|
||||
thread = Get.postFromNode(op).thread;
|
||||
@ -14064,19 +14109,19 @@
|
||||
Keybinds.img(threadRoot, true);
|
||||
break;
|
||||
case Conf['Open Gallery']:
|
||||
if (g.VIEW === 'catalog') {
|
||||
if ((_ref2 = g.VIEW) !== 'index' && _ref2 !== 'thread') {
|
||||
return;
|
||||
}
|
||||
Gallery.cb.toggle();
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('fappe');
|
||||
break;
|
||||
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;
|
||||
}
|
||||
FappeTyme.toggle('werk');
|
||||
@ -14096,7 +14141,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref1 = Conf['Index Mode']) !== 'paged' && _ref1 !== 'infinite') {
|
||||
if ((_ref5 = Conf['Index Mode']) !== 'paged' && _ref5 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.next button', Index.pagelist).click();
|
||||
@ -14111,7 +14156,7 @@
|
||||
return;
|
||||
}
|
||||
if (Conf['JSON Navigation']) {
|
||||
if ((_ref2 = Conf['Index Mode']) !== 'paged' && _ref2 !== 'infinite') {
|
||||
if ((_ref6 = Conf['Index Mode']) !== 'paged' && _ref6 !== 'infinite') {
|
||||
return;
|
||||
}
|
||||
$('.prev button', Index.pagelist).click();
|
||||
@ -14460,7 +14505,8 @@
|
||||
RelativeDates = {
|
||||
INTERVAL: $.MINUTE / 2,
|
||||
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();
|
||||
$.on(d, 'visibilitychange ThreadUpdate', this.flush);
|
||||
}
|
||||
@ -14566,14 +14612,22 @@
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
return CatalogThread.callbacks.push({
|
||||
CatalogThread.callbacks.push({
|
||||
name: 'Reveal Spoilers',
|
||||
cb: this.node
|
||||
});
|
||||
if (g.VIEW === 'archive') {
|
||||
return $.ready(function() {
|
||||
return RemoveSpoilers.unspoiler($.id('arc-list'));
|
||||
});
|
||||
}
|
||||
},
|
||||
node: function(post) {
|
||||
return RemoveSpoilers.unspoiler(this.nodes.comment);
|
||||
},
|
||||
unspoiler: function(el) {
|
||||
var span, spoiler, spoilers, _i, _len;
|
||||
spoilers = $$('s', this.nodes.comment);
|
||||
spoilers = $$('s', el);
|
||||
for (_i = 0, _len = spoilers.length; _i < _len; _i++) {
|
||||
spoiler = spoilers[_i];
|
||||
span = $.el('span', {
|
||||
@ -14587,7 +14641,8 @@
|
||||
|
||||
Time = {
|
||||
init: function() {
|
||||
if (g.VIEW === 'catalog' || !Conf['Time Formatting']) {
|
||||
var _ref;
|
||||
if (((_ref = g.VIEW) !== 'index' && _ref !== 'thread') || !Conf['Time Formatting']) {
|
||||
return;
|
||||
}
|
||||
return Post.callbacks.push({
|
||||
@ -15379,6 +15434,8 @@
|
||||
return 'thread';
|
||||
case 'catalog':
|
||||
return 'catalog';
|
||||
case 'archive':
|
||||
return 'archive';
|
||||
default:
|
||||
return 'index';
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<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>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<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>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
"version": "1.9.18.8",
|
||||
"version": "1.9.18.9",
|
||||
"repo": "https://github.com/ccd0/4chan-x/",
|
||||
"page": "https://github.com/ccd0/4chan-x",
|
||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user