Release 4chan X v1.13.0.4.
This commit is contained in:
parent
80b652c508
commit
7470b77f41
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
## v1.13.0
|
## v1.13.0
|
||||||
|
|
||||||
|
**v1.13.0.4** *(2016-10-03)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.4/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.4/builds/4chan-X-noupdate.crx)]
|
||||||
|
- Performance work and bug fixes related to recent catalog changes.
|
||||||
|
- Don't show excerpts of hidden or filtered replies in the catalog.
|
||||||
|
|
||||||
**v1.13.0.3** *(2016-10-02)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.3/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.3/builds/4chan-X-noupdate.crx)]
|
**v1.13.0.3** *(2016-10-02)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.3/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.0.3/builds/4chan-X-noupdate.crx)]
|
||||||
- Add `Pass Date` to filterable items.
|
- Add `Pass Date` to filterable items.
|
||||||
- Show Pass flair in posts constructed from JSON.
|
- Show Pass flair in posts constructed from JSON.
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.0.3
|
// @version 1.13.0.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.0.3
|
// @version 1.13.0.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -136,7 +136,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.0.3',
|
VERSION: '1.13.0.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -6453,6 +6453,7 @@ Thread = (function() {
|
|||||||
this.postLimit = false;
|
this.postLimit = false;
|
||||||
this.fileLimit = false;
|
this.fileLimit = false;
|
||||||
this.ipCount = void 0;
|
this.ipCount = void 0;
|
||||||
|
this.json = null;
|
||||||
this.OP = null;
|
this.OP = null;
|
||||||
this.catalogView = null;
|
this.catalogView = null;
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
@ -6537,11 +6538,19 @@ Thread = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Thread.prototype.collect = function() {
|
Thread.prototype.collect = function() {
|
||||||
|
var n;
|
||||||
|
n = 0;
|
||||||
this.posts.forEach(function(post) {
|
this.posts.forEach(function(post) {
|
||||||
return post.collect();
|
if (post.clones.length) {
|
||||||
|
return n++;
|
||||||
|
} else {
|
||||||
|
return post.collect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
g.threads.rm(this.fullID);
|
if (!n) {
|
||||||
return this.board.threads.rm(this);
|
g.threads.rm(this.fullID);
|
||||||
|
return this.board.threads.rm(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return Thread;
|
return Thread;
|
||||||
@ -7170,6 +7179,13 @@ PostHiding = (function() {
|
|||||||
cb: this.node
|
cb: this.node
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
isHidden: function(boardID, threadID, postID) {
|
||||||
|
return !!(PostHiding.db && PostHiding.db.get({
|
||||||
|
boardID: boardID,
|
||||||
|
threadID: threadID,
|
||||||
|
postID: postID
|
||||||
|
}));
|
||||||
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var data, sideArrows;
|
var data, sideArrows;
|
||||||
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
||||||
@ -9370,6 +9386,13 @@ Index = (function() {
|
|||||||
page: 1
|
page: 1
|
||||||
});
|
});
|
||||||
return Index.update();
|
return Index.update();
|
||||||
|
},
|
||||||
|
catalogReplies: function() {
|
||||||
|
$.off(this, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
if (!(Conf['Show Replies'] && Conf['Catalog Hover Expand'] && this.parentNode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return Index.buildCatalogReplies(Get.threadFromRoot(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollToIndex: function() {
|
scrollToIndex: function() {
|
||||||
@ -9765,8 +9788,8 @@ Index = (function() {
|
|||||||
return Index.parsedThreads[threadID].isHidden;
|
return Index.parsedThreads[threadID].isHidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildThreads: function(threadIDs) {
|
buildThreads: function(threadIDs, isCatalog) {
|
||||||
var ID, OP, err, errors, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
var ID, OP, err, errors, isStale, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
||||||
threads = [];
|
threads = [];
|
||||||
newThreads = [];
|
newThreads = [];
|
||||||
newPosts = [];
|
newPosts = [];
|
||||||
@ -9775,11 +9798,14 @@ Index = (function() {
|
|||||||
try {
|
try {
|
||||||
threadData = Index.liveThreadDict[ID];
|
threadData = Index.liveThreadDict[ID];
|
||||||
if ((thread = g.BOARD.threads[ID])) {
|
if ((thread = g.BOARD.threads[ID])) {
|
||||||
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
isStale = (thread.json !== threadData) && (JSON.stringify(thread.json) !== JSON.stringify(threadData));
|
||||||
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
if (isStale) {
|
||||||
thread.setStatus('Sticky', !!threadData.sticky);
|
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
||||||
thread.setStatus('Closed', !!threadData.closed);
|
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
||||||
if (thread.catalogView) {
|
thread.setStatus('Sticky', !!threadData.sticky);
|
||||||
|
thread.setStatus('Closed', !!threadData.closed);
|
||||||
|
}
|
||||||
|
if (thread.catalogView && (isStale || !(isCatalog && Conf['Show Replies'] && Conf['Catalog Hover Expand']))) {
|
||||||
$.rm(thread.catalogView.nodes.replies);
|
$.rm(thread.catalogView.nodes.replies);
|
||||||
thread.catalogView.nodes.replies = null;
|
thread.catalogView.nodes.replies = null;
|
||||||
}
|
}
|
||||||
@ -9787,9 +9813,10 @@ Index = (function() {
|
|||||||
thread = new Thread(ID, g.BOARD);
|
thread = new Thread(ID, g.BOARD);
|
||||||
newThreads.push(thread);
|
newThreads.push(thread);
|
||||||
}
|
}
|
||||||
|
thread.json = threadData;
|
||||||
threads.push(thread);
|
threads.push(thread);
|
||||||
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
||||||
OP.setCatalogOP(false);
|
OP.setCatalogOP(isCatalog);
|
||||||
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
||||||
} else {
|
} else {
|
||||||
obj = Index.parsedThreads[ID];
|
obj = Index.parsedThreads[ID];
|
||||||
@ -9797,7 +9824,9 @@ Index = (function() {
|
|||||||
OP.filterResults = obj.filterResults;
|
OP.filterResults = obj.filterResults;
|
||||||
newPosts.push(OP);
|
newPosts.push(OP);
|
||||||
}
|
}
|
||||||
Build.thread(thread, threadData);
|
if (!isCatalog) {
|
||||||
|
Build.thread(thread, threadData);
|
||||||
|
}
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
err = _error;
|
err = _error;
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
@ -9884,36 +9913,39 @@ Index = (function() {
|
|||||||
thumb.style.height = height * ratio + 'px';
|
thumb.style.height = height * ratio + 'px';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildCatalogReplies: function(threads) {
|
buildCatalogReplies: function(thread) {
|
||||||
var data, k, l, lastReplies, len, len1, len2, m, nodes, ref, replies, reply, thread, timeEl;
|
var data, k, l, lastReplies, len, len1, nodes, ref, replies, reply, timeEl;
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
nodes = thread.catalogView.nodes;
|
||||||
thread = threads[k];
|
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
||||||
nodes = thread.catalogView.nodes;
|
return;
|
||||||
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (nodes.replies) {
|
|
||||||
ref = $$('time', nodes.replies);
|
|
||||||
for (l = 0, len1 = ref.length; l < len1; l++) {
|
|
||||||
timeEl = ref[l];
|
|
||||||
RelativeDates.update(timeEl);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
replies = [];
|
|
||||||
for (m = 0, len2 = lastReplies.length; m < len2; m++) {
|
|
||||||
data = lastReplies[m];
|
|
||||||
reply = Build.catalogReply(thread, data);
|
|
||||||
RelativeDates.update($('time', reply));
|
|
||||||
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
|
||||||
replies.push(reply);
|
|
||||||
}
|
|
||||||
nodes.replies = $.el('div', {
|
|
||||||
className: 'catalog-replies'
|
|
||||||
});
|
|
||||||
$.add(nodes.replies, replies);
|
|
||||||
$.add(thread.OP.nodes.post, nodes.replies);
|
|
||||||
}
|
}
|
||||||
|
if (nodes.replies) {
|
||||||
|
ref = $$('time', nodes.replies);
|
||||||
|
for (k = 0, len = ref.length; k < len; k++) {
|
||||||
|
timeEl = ref[k];
|
||||||
|
RelativeDates.update(timeEl);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
replies = [];
|
||||||
|
for (l = 0, len1 = lastReplies.length; l < len1; l++) {
|
||||||
|
data = lastReplies[l];
|
||||||
|
if (PostHiding.isHidden(g.BOARD.ID, thread.ID, data.no)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Filter.isHidden(Build.parseJSON(data, g.BOARD.ID))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
reply = Build.catalogReply(thread, data);
|
||||||
|
RelativeDates.update($('time', reply));
|
||||||
|
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
||||||
|
replies.push(reply);
|
||||||
|
}
|
||||||
|
nodes.replies = $.el('div', {
|
||||||
|
className: 'catalog-replies'
|
||||||
|
});
|
||||||
|
$.add(nodes.replies, replies);
|
||||||
|
$.add(thread.OP.nodes.post, nodes.replies);
|
||||||
},
|
},
|
||||||
sort: function() {
|
sort: function() {
|
||||||
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
||||||
@ -10033,7 +10065,7 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildStructure: function(threadIDs) {
|
buildStructure: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, false);
|
||||||
if (Conf['Show Replies']) {
|
if (Conf['Show Replies']) {
|
||||||
Index.buildReplies(threads);
|
Index.buildReplies(threads);
|
||||||
}
|
}
|
||||||
@ -10049,13 +10081,17 @@ Index = (function() {
|
|||||||
Index.loaded = true;
|
Index.loaded = true;
|
||||||
},
|
},
|
||||||
buildCatalog: function(threadIDs) {
|
buildCatalog: function(threadIDs) {
|
||||||
var fn, i, n;
|
var fn, i, n, node0;
|
||||||
i = 0;
|
i = 0;
|
||||||
n = threadIDs.length;
|
n = threadIDs.length;
|
||||||
|
node0 = null;
|
||||||
fn = function() {
|
fn = function() {
|
||||||
var j;
|
var j;
|
||||||
|
if (node0 && !node0.parentNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
||||||
Index.buildCatalogPart(threadIDs.slice(i, j));
|
node0 = Index.buildCatalogPart(threadIDs.slice(i, j))[0];
|
||||||
i = j;
|
i = j;
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
return $.queueTask(fn);
|
return $.queueTask(fn);
|
||||||
@ -10070,20 +10106,21 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildCatalogPart: function(threadIDs) {
|
buildCatalogPart: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, true);
|
||||||
Index.buildCatalogViews(threads);
|
Index.buildCatalogViews(threads);
|
||||||
Index.sizeCatalogViews(threads);
|
Index.sizeCatalogViews(threads);
|
||||||
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
|
||||||
Index.buildCatalogReplies(threads);
|
|
||||||
}
|
|
||||||
nodes = [];
|
nodes = [];
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
for (k = 0, len = threads.length; k < len; k++) {
|
||||||
thread = threads[k];
|
thread = threads[k];
|
||||||
thread.OP.setCatalogOP(true);
|
thread.OP.setCatalogOP(true);
|
||||||
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
||||||
nodes.push(thread.catalogView.nodes.root);
|
nodes.push(thread.catalogView.nodes.root);
|
||||||
|
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
||||||
|
$.on(thread.catalogView.nodes.root, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$.add(Index.root, nodes);
|
$.add(Index.root, nodes);
|
||||||
|
return nodes;
|
||||||
},
|
},
|
||||||
clearSearch: function() {
|
clearSearch: function() {
|
||||||
Index.searchInput.value = '';
|
Index.searchInput.value = '';
|
||||||
@ -20901,8 +20938,6 @@ QR = (function() {
|
|||||||
thread: 0,
|
thread: 0,
|
||||||
reply: 0,
|
reply: 0,
|
||||||
image: 0,
|
image: 0,
|
||||||
reply_intra: 0,
|
|
||||||
image_intra: 0,
|
|
||||||
deletion: 60,
|
deletion: 60,
|
||||||
thread_global: 300
|
thread_global: 300
|
||||||
},
|
},
|
||||||
@ -20914,14 +20949,12 @@ QR = (function() {
|
|||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var base, base1, delay, i, key, len, m, ref, ref1, type;
|
var delay, i, key, len, m, ref, ref1, type;
|
||||||
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
||||||
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
||||||
(base = QR.cooldown.delays).reply_intra || (base.reply_intra = QR.cooldown.delays.reply);
|
|
||||||
(base1 = QR.cooldown.delays).image_intra || (base1.image_intra = QR.cooldown.delays.image);
|
|
||||||
}
|
}
|
||||||
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
||||||
ref = ['reply', 'image', 'reply_intra', 'image_intra'];
|
ref = ['reply', 'image'];
|
||||||
for (i = 0, len = ref.length; i < len; i++) {
|
for (i = 0, len = ref.length; i < len; i++) {
|
||||||
key = ref[i];
|
key = ref[i];
|
||||||
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
||||||
@ -21092,7 +21125,7 @@ QR = (function() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
suffix = scope === 'global' ? '_global' : type !== 'thread' && threadID === cooldown.threadID ? '_intra' : '';
|
suffix = scope === 'global' ? '_global' : '';
|
||||||
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
||||||
}
|
}
|
||||||
if (QR.cooldown.customCooldown) {
|
if (QR.cooldown.customCooldown) {
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.0.3
|
// @version 1.13.0.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -136,7 +136,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.0.3',
|
VERSION: '1.13.0.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -6453,6 +6453,7 @@ Thread = (function() {
|
|||||||
this.postLimit = false;
|
this.postLimit = false;
|
||||||
this.fileLimit = false;
|
this.fileLimit = false;
|
||||||
this.ipCount = void 0;
|
this.ipCount = void 0;
|
||||||
|
this.json = null;
|
||||||
this.OP = null;
|
this.OP = null;
|
||||||
this.catalogView = null;
|
this.catalogView = null;
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
@ -6537,11 +6538,19 @@ Thread = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Thread.prototype.collect = function() {
|
Thread.prototype.collect = function() {
|
||||||
|
var n;
|
||||||
|
n = 0;
|
||||||
this.posts.forEach(function(post) {
|
this.posts.forEach(function(post) {
|
||||||
return post.collect();
|
if (post.clones.length) {
|
||||||
|
return n++;
|
||||||
|
} else {
|
||||||
|
return post.collect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
g.threads.rm(this.fullID);
|
if (!n) {
|
||||||
return this.board.threads.rm(this);
|
g.threads.rm(this.fullID);
|
||||||
|
return this.board.threads.rm(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return Thread;
|
return Thread;
|
||||||
@ -7170,6 +7179,13 @@ PostHiding = (function() {
|
|||||||
cb: this.node
|
cb: this.node
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
isHidden: function(boardID, threadID, postID) {
|
||||||
|
return !!(PostHiding.db && PostHiding.db.get({
|
||||||
|
boardID: boardID,
|
||||||
|
threadID: threadID,
|
||||||
|
postID: postID
|
||||||
|
}));
|
||||||
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var data, sideArrows;
|
var data, sideArrows;
|
||||||
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
||||||
@ -9370,6 +9386,13 @@ Index = (function() {
|
|||||||
page: 1
|
page: 1
|
||||||
});
|
});
|
||||||
return Index.update();
|
return Index.update();
|
||||||
|
},
|
||||||
|
catalogReplies: function() {
|
||||||
|
$.off(this, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
if (!(Conf['Show Replies'] && Conf['Catalog Hover Expand'] && this.parentNode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return Index.buildCatalogReplies(Get.threadFromRoot(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollToIndex: function() {
|
scrollToIndex: function() {
|
||||||
@ -9765,8 +9788,8 @@ Index = (function() {
|
|||||||
return Index.parsedThreads[threadID].isHidden;
|
return Index.parsedThreads[threadID].isHidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildThreads: function(threadIDs) {
|
buildThreads: function(threadIDs, isCatalog) {
|
||||||
var ID, OP, err, errors, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
var ID, OP, err, errors, isStale, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
||||||
threads = [];
|
threads = [];
|
||||||
newThreads = [];
|
newThreads = [];
|
||||||
newPosts = [];
|
newPosts = [];
|
||||||
@ -9775,11 +9798,14 @@ Index = (function() {
|
|||||||
try {
|
try {
|
||||||
threadData = Index.liveThreadDict[ID];
|
threadData = Index.liveThreadDict[ID];
|
||||||
if ((thread = g.BOARD.threads[ID])) {
|
if ((thread = g.BOARD.threads[ID])) {
|
||||||
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
isStale = (thread.json !== threadData) && (JSON.stringify(thread.json) !== JSON.stringify(threadData));
|
||||||
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
if (isStale) {
|
||||||
thread.setStatus('Sticky', !!threadData.sticky);
|
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
||||||
thread.setStatus('Closed', !!threadData.closed);
|
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
||||||
if (thread.catalogView) {
|
thread.setStatus('Sticky', !!threadData.sticky);
|
||||||
|
thread.setStatus('Closed', !!threadData.closed);
|
||||||
|
}
|
||||||
|
if (thread.catalogView && (isStale || !(isCatalog && Conf['Show Replies'] && Conf['Catalog Hover Expand']))) {
|
||||||
$.rm(thread.catalogView.nodes.replies);
|
$.rm(thread.catalogView.nodes.replies);
|
||||||
thread.catalogView.nodes.replies = null;
|
thread.catalogView.nodes.replies = null;
|
||||||
}
|
}
|
||||||
@ -9787,9 +9813,10 @@ Index = (function() {
|
|||||||
thread = new Thread(ID, g.BOARD);
|
thread = new Thread(ID, g.BOARD);
|
||||||
newThreads.push(thread);
|
newThreads.push(thread);
|
||||||
}
|
}
|
||||||
|
thread.json = threadData;
|
||||||
threads.push(thread);
|
threads.push(thread);
|
||||||
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
||||||
OP.setCatalogOP(false);
|
OP.setCatalogOP(isCatalog);
|
||||||
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
||||||
} else {
|
} else {
|
||||||
obj = Index.parsedThreads[ID];
|
obj = Index.parsedThreads[ID];
|
||||||
@ -9797,7 +9824,9 @@ Index = (function() {
|
|||||||
OP.filterResults = obj.filterResults;
|
OP.filterResults = obj.filterResults;
|
||||||
newPosts.push(OP);
|
newPosts.push(OP);
|
||||||
}
|
}
|
||||||
Build.thread(thread, threadData);
|
if (!isCatalog) {
|
||||||
|
Build.thread(thread, threadData);
|
||||||
|
}
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
err = _error;
|
err = _error;
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
@ -9884,36 +9913,39 @@ Index = (function() {
|
|||||||
thumb.style.height = height * ratio + 'px';
|
thumb.style.height = height * ratio + 'px';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildCatalogReplies: function(threads) {
|
buildCatalogReplies: function(thread) {
|
||||||
var data, k, l, lastReplies, len, len1, len2, m, nodes, ref, replies, reply, thread, timeEl;
|
var data, k, l, lastReplies, len, len1, nodes, ref, replies, reply, timeEl;
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
nodes = thread.catalogView.nodes;
|
||||||
thread = threads[k];
|
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
||||||
nodes = thread.catalogView.nodes;
|
return;
|
||||||
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (nodes.replies) {
|
|
||||||
ref = $$('time', nodes.replies);
|
|
||||||
for (l = 0, len1 = ref.length; l < len1; l++) {
|
|
||||||
timeEl = ref[l];
|
|
||||||
RelativeDates.update(timeEl);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
replies = [];
|
|
||||||
for (m = 0, len2 = lastReplies.length; m < len2; m++) {
|
|
||||||
data = lastReplies[m];
|
|
||||||
reply = Build.catalogReply(thread, data);
|
|
||||||
RelativeDates.update($('time', reply));
|
|
||||||
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
|
||||||
replies.push(reply);
|
|
||||||
}
|
|
||||||
nodes.replies = $.el('div', {
|
|
||||||
className: 'catalog-replies'
|
|
||||||
});
|
|
||||||
$.add(nodes.replies, replies);
|
|
||||||
$.add(thread.OP.nodes.post, nodes.replies);
|
|
||||||
}
|
}
|
||||||
|
if (nodes.replies) {
|
||||||
|
ref = $$('time', nodes.replies);
|
||||||
|
for (k = 0, len = ref.length; k < len; k++) {
|
||||||
|
timeEl = ref[k];
|
||||||
|
RelativeDates.update(timeEl);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
replies = [];
|
||||||
|
for (l = 0, len1 = lastReplies.length; l < len1; l++) {
|
||||||
|
data = lastReplies[l];
|
||||||
|
if (PostHiding.isHidden(g.BOARD.ID, thread.ID, data.no)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Filter.isHidden(Build.parseJSON(data, g.BOARD.ID))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
reply = Build.catalogReply(thread, data);
|
||||||
|
RelativeDates.update($('time', reply));
|
||||||
|
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
||||||
|
replies.push(reply);
|
||||||
|
}
|
||||||
|
nodes.replies = $.el('div', {
|
||||||
|
className: 'catalog-replies'
|
||||||
|
});
|
||||||
|
$.add(nodes.replies, replies);
|
||||||
|
$.add(thread.OP.nodes.post, nodes.replies);
|
||||||
},
|
},
|
||||||
sort: function() {
|
sort: function() {
|
||||||
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
||||||
@ -10033,7 +10065,7 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildStructure: function(threadIDs) {
|
buildStructure: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, false);
|
||||||
if (Conf['Show Replies']) {
|
if (Conf['Show Replies']) {
|
||||||
Index.buildReplies(threads);
|
Index.buildReplies(threads);
|
||||||
}
|
}
|
||||||
@ -10049,13 +10081,17 @@ Index = (function() {
|
|||||||
Index.loaded = true;
|
Index.loaded = true;
|
||||||
},
|
},
|
||||||
buildCatalog: function(threadIDs) {
|
buildCatalog: function(threadIDs) {
|
||||||
var fn, i, n;
|
var fn, i, n, node0;
|
||||||
i = 0;
|
i = 0;
|
||||||
n = threadIDs.length;
|
n = threadIDs.length;
|
||||||
|
node0 = null;
|
||||||
fn = function() {
|
fn = function() {
|
||||||
var j;
|
var j;
|
||||||
|
if (node0 && !node0.parentNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
||||||
Index.buildCatalogPart(threadIDs.slice(i, j));
|
node0 = Index.buildCatalogPart(threadIDs.slice(i, j))[0];
|
||||||
i = j;
|
i = j;
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
return $.queueTask(fn);
|
return $.queueTask(fn);
|
||||||
@ -10070,20 +10106,21 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildCatalogPart: function(threadIDs) {
|
buildCatalogPart: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, true);
|
||||||
Index.buildCatalogViews(threads);
|
Index.buildCatalogViews(threads);
|
||||||
Index.sizeCatalogViews(threads);
|
Index.sizeCatalogViews(threads);
|
||||||
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
|
||||||
Index.buildCatalogReplies(threads);
|
|
||||||
}
|
|
||||||
nodes = [];
|
nodes = [];
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
for (k = 0, len = threads.length; k < len; k++) {
|
||||||
thread = threads[k];
|
thread = threads[k];
|
||||||
thread.OP.setCatalogOP(true);
|
thread.OP.setCatalogOP(true);
|
||||||
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
||||||
nodes.push(thread.catalogView.nodes.root);
|
nodes.push(thread.catalogView.nodes.root);
|
||||||
|
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
||||||
|
$.on(thread.catalogView.nodes.root, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$.add(Index.root, nodes);
|
$.add(Index.root, nodes);
|
||||||
|
return nodes;
|
||||||
},
|
},
|
||||||
clearSearch: function() {
|
clearSearch: function() {
|
||||||
Index.searchInput.value = '';
|
Index.searchInput.value = '';
|
||||||
@ -20901,8 +20938,6 @@ QR = (function() {
|
|||||||
thread: 0,
|
thread: 0,
|
||||||
reply: 0,
|
reply: 0,
|
||||||
image: 0,
|
image: 0,
|
||||||
reply_intra: 0,
|
|
||||||
image_intra: 0,
|
|
||||||
deletion: 60,
|
deletion: 60,
|
||||||
thread_global: 300
|
thread_global: 300
|
||||||
},
|
},
|
||||||
@ -20914,14 +20949,12 @@ QR = (function() {
|
|||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var base, base1, delay, i, key, len, m, ref, ref1, type;
|
var delay, i, key, len, m, ref, ref1, type;
|
||||||
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
||||||
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
||||||
(base = QR.cooldown.delays).reply_intra || (base.reply_intra = QR.cooldown.delays.reply);
|
|
||||||
(base1 = QR.cooldown.delays).image_intra || (base1.image_intra = QR.cooldown.delays.image);
|
|
||||||
}
|
}
|
||||||
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
||||||
ref = ['reply', 'image', 'reply_intra', 'image_intra'];
|
ref = ['reply', 'image'];
|
||||||
for (i = 0, len = ref.length; i < len; i++) {
|
for (i = 0, len = ref.length; i < len; i++) {
|
||||||
key = ref[i];
|
key = ref[i];
|
||||||
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
||||||
@ -21092,7 +21125,7 @@ QR = (function() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
suffix = scope === 'global' ? '_global' : type !== 'thread' && threadID === cooldown.threadID ? '_intra' : '';
|
suffix = scope === 'global' ? '_global' : '';
|
||||||
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
||||||
}
|
}
|
||||||
if (QR.cooldown.customCooldown) {
|
if (QR.cooldown.customCooldown) {
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.0.3
|
// @version 1.13.0.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.0.3
|
// @version 1.13.0.4
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -136,7 +136,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.0.3',
|
VERSION: '1.13.0.4',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -6453,6 +6453,7 @@ Thread = (function() {
|
|||||||
this.postLimit = false;
|
this.postLimit = false;
|
||||||
this.fileLimit = false;
|
this.fileLimit = false;
|
||||||
this.ipCount = void 0;
|
this.ipCount = void 0;
|
||||||
|
this.json = null;
|
||||||
this.OP = null;
|
this.OP = null;
|
||||||
this.catalogView = null;
|
this.catalogView = null;
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
@ -6537,11 +6538,19 @@ Thread = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Thread.prototype.collect = function() {
|
Thread.prototype.collect = function() {
|
||||||
|
var n;
|
||||||
|
n = 0;
|
||||||
this.posts.forEach(function(post) {
|
this.posts.forEach(function(post) {
|
||||||
return post.collect();
|
if (post.clones.length) {
|
||||||
|
return n++;
|
||||||
|
} else {
|
||||||
|
return post.collect();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
g.threads.rm(this.fullID);
|
if (!n) {
|
||||||
return this.board.threads.rm(this);
|
g.threads.rm(this.fullID);
|
||||||
|
return this.board.threads.rm(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return Thread;
|
return Thread;
|
||||||
@ -7170,6 +7179,13 @@ PostHiding = (function() {
|
|||||||
cb: this.node
|
cb: this.node
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
isHidden: function(boardID, threadID, postID) {
|
||||||
|
return !!(PostHiding.db && PostHiding.db.get({
|
||||||
|
boardID: boardID,
|
||||||
|
threadID: threadID,
|
||||||
|
postID: postID
|
||||||
|
}));
|
||||||
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var data, sideArrows;
|
var data, sideArrows;
|
||||||
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
if (!this.isReply || this.isClone || this.isFetchedQuote) {
|
||||||
@ -9370,6 +9386,13 @@ Index = (function() {
|
|||||||
page: 1
|
page: 1
|
||||||
});
|
});
|
||||||
return Index.update();
|
return Index.update();
|
||||||
|
},
|
||||||
|
catalogReplies: function() {
|
||||||
|
$.off(this, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
if (!(Conf['Show Replies'] && Conf['Catalog Hover Expand'] && this.parentNode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return Index.buildCatalogReplies(Get.threadFromRoot(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollToIndex: function() {
|
scrollToIndex: function() {
|
||||||
@ -9765,8 +9788,8 @@ Index = (function() {
|
|||||||
return Index.parsedThreads[threadID].isHidden;
|
return Index.parsedThreads[threadID].isHidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildThreads: function(threadIDs) {
|
buildThreads: function(threadIDs, isCatalog) {
|
||||||
var ID, OP, err, errors, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
var ID, OP, err, errors, isStale, k, len, newPosts, newThreads, obj, thread, threadData, threads;
|
||||||
threads = [];
|
threads = [];
|
||||||
newThreads = [];
|
newThreads = [];
|
||||||
newPosts = [];
|
newPosts = [];
|
||||||
@ -9775,11 +9798,14 @@ Index = (function() {
|
|||||||
try {
|
try {
|
||||||
threadData = Index.liveThreadDict[ID];
|
threadData = Index.liveThreadDict[ID];
|
||||||
if ((thread = g.BOARD.threads[ID])) {
|
if ((thread = g.BOARD.threads[ID])) {
|
||||||
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
isStale = (thread.json !== threadData) && (JSON.stringify(thread.json) !== JSON.stringify(threadData));
|
||||||
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
if (isStale) {
|
||||||
thread.setStatus('Sticky', !!threadData.sticky);
|
thread.setCount('post', threadData.replies + 1, threadData.bumplimit);
|
||||||
thread.setStatus('Closed', !!threadData.closed);
|
thread.setCount('file', threadData.images + !!threadData.ext, threadData.imagelimit);
|
||||||
if (thread.catalogView) {
|
thread.setStatus('Sticky', !!threadData.sticky);
|
||||||
|
thread.setStatus('Closed', !!threadData.closed);
|
||||||
|
}
|
||||||
|
if (thread.catalogView && (isStale || !(isCatalog && Conf['Show Replies'] && Conf['Catalog Hover Expand']))) {
|
||||||
$.rm(thread.catalogView.nodes.replies);
|
$.rm(thread.catalogView.nodes.replies);
|
||||||
thread.catalogView.nodes.replies = null;
|
thread.catalogView.nodes.replies = null;
|
||||||
}
|
}
|
||||||
@ -9787,9 +9813,10 @@ Index = (function() {
|
|||||||
thread = new Thread(ID, g.BOARD);
|
thread = new Thread(ID, g.BOARD);
|
||||||
newThreads.push(thread);
|
newThreads.push(thread);
|
||||||
}
|
}
|
||||||
|
thread.json = threadData;
|
||||||
threads.push(thread);
|
threads.push(thread);
|
||||||
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
if ((OP = thread.OP) && !OP.isFetchedQuote) {
|
||||||
OP.setCatalogOP(false);
|
OP.setCatalogOP(isCatalog);
|
||||||
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
thread.setPage(Math.floor(Index.threadPosition[ID] / Index.threadsNumPerPage) + 1);
|
||||||
} else {
|
} else {
|
||||||
obj = Index.parsedThreads[ID];
|
obj = Index.parsedThreads[ID];
|
||||||
@ -9797,7 +9824,9 @@ Index = (function() {
|
|||||||
OP.filterResults = obj.filterResults;
|
OP.filterResults = obj.filterResults;
|
||||||
newPosts.push(OP);
|
newPosts.push(OP);
|
||||||
}
|
}
|
||||||
Build.thread(thread, threadData);
|
if (!isCatalog) {
|
||||||
|
Build.thread(thread, threadData);
|
||||||
|
}
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
err = _error;
|
err = _error;
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
@ -9884,36 +9913,39 @@ Index = (function() {
|
|||||||
thumb.style.height = height * ratio + 'px';
|
thumb.style.height = height * ratio + 'px';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildCatalogReplies: function(threads) {
|
buildCatalogReplies: function(thread) {
|
||||||
var data, k, l, lastReplies, len, len1, len2, m, nodes, ref, replies, reply, thread, timeEl;
|
var data, k, l, lastReplies, len, len1, nodes, ref, replies, reply, timeEl;
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
nodes = thread.catalogView.nodes;
|
||||||
thread = threads[k];
|
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
||||||
nodes = thread.catalogView.nodes;
|
return;
|
||||||
if (!(lastReplies = Index.liveThreadDict[thread.ID].last_replies)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (nodes.replies) {
|
|
||||||
ref = $$('time', nodes.replies);
|
|
||||||
for (l = 0, len1 = ref.length; l < len1; l++) {
|
|
||||||
timeEl = ref[l];
|
|
||||||
RelativeDates.update(timeEl);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
replies = [];
|
|
||||||
for (m = 0, len2 = lastReplies.length; m < len2; m++) {
|
|
||||||
data = lastReplies[m];
|
|
||||||
reply = Build.catalogReply(thread, data);
|
|
||||||
RelativeDates.update($('time', reply));
|
|
||||||
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
|
||||||
replies.push(reply);
|
|
||||||
}
|
|
||||||
nodes.replies = $.el('div', {
|
|
||||||
className: 'catalog-replies'
|
|
||||||
});
|
|
||||||
$.add(nodes.replies, replies);
|
|
||||||
$.add(thread.OP.nodes.post, nodes.replies);
|
|
||||||
}
|
}
|
||||||
|
if (nodes.replies) {
|
||||||
|
ref = $$('time', nodes.replies);
|
||||||
|
for (k = 0, len = ref.length; k < len; k++) {
|
||||||
|
timeEl = ref[k];
|
||||||
|
RelativeDates.update(timeEl);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
replies = [];
|
||||||
|
for (l = 0, len1 = lastReplies.length; l < len1; l++) {
|
||||||
|
data = lastReplies[l];
|
||||||
|
if (PostHiding.isHidden(g.BOARD.ID, thread.ID, data.no)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Filter.isHidden(Build.parseJSON(data, g.BOARD.ID))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
reply = Build.catalogReply(thread, data);
|
||||||
|
RelativeDates.update($('time', reply));
|
||||||
|
$.on($('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover);
|
||||||
|
replies.push(reply);
|
||||||
|
}
|
||||||
|
nodes.replies = $.el('div', {
|
||||||
|
className: 'catalog-replies'
|
||||||
|
});
|
||||||
|
$.add(nodes.replies, replies);
|
||||||
|
$.add(thread.OP.nodes.post, nodes.replies);
|
||||||
},
|
},
|
||||||
sort: function() {
|
sort: function() {
|
||||||
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
var lastlong, liveThreadData, liveThreadIDs, threadIDs;
|
||||||
@ -10033,7 +10065,7 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildStructure: function(threadIDs) {
|
buildStructure: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, false);
|
||||||
if (Conf['Show Replies']) {
|
if (Conf['Show Replies']) {
|
||||||
Index.buildReplies(threads);
|
Index.buildReplies(threads);
|
||||||
}
|
}
|
||||||
@ -10049,13 +10081,17 @@ Index = (function() {
|
|||||||
Index.loaded = true;
|
Index.loaded = true;
|
||||||
},
|
},
|
||||||
buildCatalog: function(threadIDs) {
|
buildCatalog: function(threadIDs) {
|
||||||
var fn, i, n;
|
var fn, i, n, node0;
|
||||||
i = 0;
|
i = 0;
|
||||||
n = threadIDs.length;
|
n = threadIDs.length;
|
||||||
|
node0 = null;
|
||||||
fn = function() {
|
fn = function() {
|
||||||
var j;
|
var j;
|
||||||
|
if (node0 && !node0.parentNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
j = i > 0 && Index.root.parentNode ? n : i + 30;
|
||||||
Index.buildCatalogPart(threadIDs.slice(i, j));
|
node0 = Index.buildCatalogPart(threadIDs.slice(i, j))[0];
|
||||||
i = j;
|
i = j;
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
return $.queueTask(fn);
|
return $.queueTask(fn);
|
||||||
@ -10070,20 +10106,21 @@ Index = (function() {
|
|||||||
},
|
},
|
||||||
buildCatalogPart: function(threadIDs) {
|
buildCatalogPart: function(threadIDs) {
|
||||||
var k, len, nodes, thread, threads;
|
var k, len, nodes, thread, threads;
|
||||||
threads = Index.buildThreads(threadIDs);
|
threads = Index.buildThreads(threadIDs, true);
|
||||||
Index.buildCatalogViews(threads);
|
Index.buildCatalogViews(threads);
|
||||||
Index.sizeCatalogViews(threads);
|
Index.sizeCatalogViews(threads);
|
||||||
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
|
||||||
Index.buildCatalogReplies(threads);
|
|
||||||
}
|
|
||||||
nodes = [];
|
nodes = [];
|
||||||
for (k = 0, len = threads.length; k < len; k++) {
|
for (k = 0, len = threads.length; k < len; k++) {
|
||||||
thread = threads[k];
|
thread = threads[k];
|
||||||
thread.OP.setCatalogOP(true);
|
thread.OP.setCatalogOP(true);
|
||||||
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
$.add(thread.catalogView.nodes.root, thread.OP.nodes.root);
|
||||||
nodes.push(thread.catalogView.nodes.root);
|
nodes.push(thread.catalogView.nodes.root);
|
||||||
|
if (Conf['Show Replies'] && Conf['Catalog Hover Expand']) {
|
||||||
|
$.on(thread.catalogView.nodes.root, 'mouseover', Index.cb.catalogReplies);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$.add(Index.root, nodes);
|
$.add(Index.root, nodes);
|
||||||
|
return nodes;
|
||||||
},
|
},
|
||||||
clearSearch: function() {
|
clearSearch: function() {
|
||||||
Index.searchInput.value = '';
|
Index.searchInput.value = '';
|
||||||
@ -20901,8 +20938,6 @@ QR = (function() {
|
|||||||
thread: 0,
|
thread: 0,
|
||||||
reply: 0,
|
reply: 0,
|
||||||
image: 0,
|
image: 0,
|
||||||
reply_intra: 0,
|
|
||||||
image_intra: 0,
|
|
||||||
deletion: 60,
|
deletion: 60,
|
||||||
thread_global: 300
|
thread_global: 300
|
||||||
},
|
},
|
||||||
@ -20914,14 +20949,12 @@ QR = (function() {
|
|||||||
return $.sync('cooldowns', this.sync);
|
return $.sync('cooldowns', this.sync);
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var base, base1, delay, i, key, len, m, ref, ref1, type;
|
var delay, i, key, len, m, ref, ref1, type;
|
||||||
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
if (m = Get.scriptData().match(/\bcooldowns *= *({[^}]+})/)) {
|
||||||
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
$.extend(QR.cooldown.delays, JSON.parse(m[1]));
|
||||||
(base = QR.cooldown.delays).reply_intra || (base.reply_intra = QR.cooldown.delays.reply);
|
|
||||||
(base1 = QR.cooldown.delays).image_intra || (base1.image_intra = QR.cooldown.delays.image);
|
|
||||||
}
|
}
|
||||||
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
if (d.cookie.indexOf('pass_enabled=1') >= 0) {
|
||||||
ref = ['reply', 'image', 'reply_intra', 'image_intra'];
|
ref = ['reply', 'image'];
|
||||||
for (i = 0, len = ref.length; i < len; i++) {
|
for (i = 0, len = ref.length; i < len; i++) {
|
||||||
key = ref[i];
|
key = ref[i];
|
||||||
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
QR.cooldown.delays[key] = Math.ceil(QR.cooldown.delays[key] / 2);
|
||||||
@ -21092,7 +21125,7 @@ QR = (function() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
if ((type === 'thread') === (cooldown.threadID === cooldown.postID) && cooldown.boardID !== g.BOARD.ID) {
|
||||||
suffix = scope === 'global' ? '_global' : type !== 'thread' && threadID === cooldown.threadID ? '_intra' : '';
|
suffix = scope === 'global' ? '_global' : '';
|
||||||
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
seconds = Math.max(seconds, QR.cooldown.delays[type + suffix] - elapsed);
|
||||||
}
|
}
|
||||||
if (QR.cooldown.customCooldown) {
|
if (QR.cooldown.customCooldown) {
|
||||||
|
|||||||
Binary file not shown.
@ -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://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.0.3' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.0.4' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -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://www.4chan-x.net/builds/4chan-X.crx' version='1.13.0.3' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.0.4' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"version": "1.13.0.3",
|
"version": "1.13.0.4",
|
||||||
"date": "2016-10-02T21:33:35.481Z"
|
"date": "2016-10-03T09:51:25.635Z"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user