Release 4chan X v1.14.7.1.

This commit is contained in:
ccd0 2019-04-09 10:54:01 -07:00
parent 8cff55c70e
commit 0b341ce2d2
15 changed files with 178 additions and 140 deletions

View File

@ -4,6 +4,11 @@
### v1.14.7 ### v1.14.7
**v1.14.7.1** *(2019-04-09)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.crx)]
- Tolerate broken HTML better.
- Fix 4chan/4channel not being correct in certain links.
- Use boards.json to determine whether to activate [code] and [math] tag related functions. #525
**v1.14.7.0** *(2019-04-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.0/builds/4chan-X-noupdate.crx)] **v1.14.7.0** *(2019-04-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.0/builds/4chan-X-noupdate.crx)]
- Based on v1.14.6.8. - Based on v1.14.6.8.
- (Teasday) Hotkey to toggle quote threading, `Shift+t` by default. - (Teasday) Hotkey to toggle quote threading, `Shift+t` by default.

Binary file not shown.

View File

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

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.14.7.0 // @version 1.14.7.1
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.0', VERSION: '1.14.7.1',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5671,12 +5671,12 @@ Callbacks = (function() {
return this[name] = cb; return this[name] = cb;
}; };
Callbacks.prototype.execute = function(node, keys) { Callbacks.prototype.execute = function(node, keys, force) {
var err, errors, i, len, name, ref, ref1, ref2; var err, errors, i, len, name, ref, ref1, ref2;
if (keys == null) { if (keys == null) {
keys = this.keys; keys = this.keys;
} }
if (node.callbacksExecuted) { if (node.callbacksExecuted && !force) {
return; return;
} }
node.callbacksExecuted = true; node.callbacksExecuted = true;
@ -7382,7 +7382,7 @@ SW = {};
SW.tinyboard = { SW.tinyboard = {
isOPContainerThread: true, isOPContainerThread: true,
mayLackJSON: true, mayLackJSON: true,
disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Fourchan thingies', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'], disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'],
detect: function() { detect: function() {
var i, len, m, properties, ref, root, script; var i, len, m, properties, ref, root, script;
ref = $$('script:not([src])', d.head); ref = $$('script:not([src])', d.head);
@ -9367,13 +9367,18 @@ Build = (function() {
sameThread: function(boardID, threadID) { sameThread: function(boardID, threadID) {
return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID; return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID;
}, },
postURL: function(boardID, threadID, postID) { threadURL: function(boardID, threadID) {
if (Build.sameThread(boardID, threadID)) { if (boardID !== g.BOARD.ID) {
return "#p" + postID; return "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID;
} else if (g.VIEW !== 'thread' || +threadID !== g.THREADID) {
return "/" + boardID + "/thread/" + threadID;
} else { } else {
return "/" + boardID + "/thread/" + threadID + "#p" + postID; return '';
} }
}, },
postURL: function(boardID, threadID, postID) {
return (Build.threadURL(boardID, threadID)) + "#p" + postID;
},
parseJSON: function(data, boardID, siteID) { parseJSON: function(data, boardID, siteID) {
var key, o; var key, o;
o = { o = {
@ -9456,7 +9461,7 @@ Build = (function() {
return Build.post(o); return Build.post(o);
}, },
post: function(o) { post: function(o) {
var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, wholePost; var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, url, wholePost;
ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file; ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file;
ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML; ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML;
staticPath = Build.staticPath, gifIcon = Build.gifIcon; staticPath = Build.staticPath, gifIcon = Build.gifIcon;
@ -9479,8 +9484,9 @@ Build = (function() {
capcodeDescription = "a 4chan " + capcodeLong; capcodeDescription = "a 4chan " + capcodeLong;
} }
} }
postLink = Build.postURL(boardID, threadID, ID); url = Build.threadURL(boardID, threadID);
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : "/" + boardID + "/thread/" + threadID + "#q" + ID; postLink = url + "#p" + ID;
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : url + "#q" + ID;
postInfo = { postInfo = {
innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>" innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>"
}; };
@ -9510,12 +9516,14 @@ Build = (function() {
for (i = 0, len = ref1.length; i < len; i++) { for (i = 0, len = ref1.length; i < len; i++) {
quote = ref1[i]; quote = ref1[i];
href = quote.getAttribute('href'); href = quote.getAttribute('href');
if ((href[0] === '#') && !(Build.sameThread(boardID, threadID))) { if (href[0] === '#') {
quote.href = ("/" + boardID + "/thread/" + threadID) + href; if (!Build.sameThread(boardID, threadID)) {
} else if ((match = href.match(/^\/([^\/]+)\/thread\/(\d+)/)) && (Build.sameThread(match[1], match[2]))) { quote.href = Build.threadURL(boardID, threadID) + href;
quote.href = href.match(/(#[^#]*)?$/)[0] || '#'; }
} else if (/^\d+(#|$)/.test(href) && !(g.VIEW === 'thread' && g.BOARD.ID === boardID)) { } else {
quote.href = "/" + boardID + "/thread/" + href; if ((match = quote.href.match(SW.yotsuba.regexp.quotelink)) && (Build.sameThread(match[1], match[2]))) {
quote.href = href.match(/(#[^#]*)?$/)[0] || '#';
}
} }
} }
return container; return container;
@ -17138,12 +17146,6 @@ ExpandComment = (function() {
if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) { if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) {
return; return;
} }
if (g.BOARD.ID === 'g') {
this.callbacks.push(Fourchan.code);
}
if (g.BOARD.ID === 'sci') {
this.callbacks.push(Fourchan.math);
}
return Callbacks.Post.push({ return Callbacks.Post.push({
name: 'Comment Expansion', name: 'Comment Expansion',
cb: this.node cb: this.node
@ -17646,10 +17648,14 @@ Fourchan = (function() {
Fourchan = { Fourchan = {
init: function() { init: function() {
var ref; var ref;
if ((ref = g.VIEW) !== 'index' && ref !== 'thread' && ref !== 'archive') { if (!(Site.software === 'yotsuba' && ((ref = g.VIEW) === 'index' || ref === 'thread' || ref === 'archive'))) {
return; return;
} }
if (g.BOARD.ID === 'g') { BoardConfig.ready(this.initBoard);
return Main.ready(this.initReady);
},
initBoard: function() {
if (g.BOARD.config.code_tags) {
$.on(window, 'prettyprint:cb', function(e) { $.on(window, 'prettyprint:cb', function(e) {
var post, pre; var post, pre;
if (!(post = g.posts[e.detail.ID])) { if (!(post = g.posts[e.detail.ID])) {
@ -17665,11 +17671,15 @@ Fourchan = (function() {
}); });
$.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);'); $.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);');
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /g/ code', name: 'Parse [code] tags',
cb: this.code cb: Fourchan.code
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [code] tags'], true);
});
ExpandComment.callbacks.push(Fourchan.code);
} }
if (g.BOARD.ID === 'sci') { if (g.BOARD.config.math_tags) {
$.global(function() { $.global(function() {
return window.addEventListener('mathjax', function(e) { return window.addEventListener('mathjax', function(e) {
if (window.MathJax) { if (window.MathJax) {
@ -17688,20 +17698,24 @@ Fourchan = (function() {
}, false); }, false);
}); });
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /sci/ math', name: 'Parse [math] tags',
cb: this.math cb: Fourchan.math
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [math] tags'], true);
});
return ExpandComment.callbacks.push(Fourchan.math);
} }
return Main.ready(function() { },
return $.global(function() { initReady: function() {
var j, len, node, ref1; return $.global(function() {
window.clickable_ids = false; var j, len, node, ref;
ref1 = document.querySelectorAll('.posteruid, .capcode'); window.clickable_ids = false;
for (j = 0, len = ref1.length; j < len; j++) { ref = document.querySelectorAll('.posteruid, .capcode');
node = ref1[j]; for (j = 0, len = ref.length; j < len; j++) {
node.removeEventListener('click', window.idClick, false); node = ref[j];
} node.removeEventListener('click', window.idClick, false);
}); }
}); });
}, },
code: function() { code: function() {
@ -25519,9 +25533,6 @@ Main = (function() {
Main = { Main = {
init: function() { init: function() {
var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w; var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w;
if (d.body && !$('title', d.head)) {
return;
}
try { try {
w = window; w = window;
if ($.platform === 'crx') { if ($.platform === 'crx') {

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.14.7.0 // @version 1.14.7.1
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.0', VERSION: '1.14.7.1',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5671,12 +5671,12 @@ Callbacks = (function() {
return this[name] = cb; return this[name] = cb;
}; };
Callbacks.prototype.execute = function(node, keys) { Callbacks.prototype.execute = function(node, keys, force) {
var err, errors, i, len, name, ref, ref1, ref2; var err, errors, i, len, name, ref, ref1, ref2;
if (keys == null) { if (keys == null) {
keys = this.keys; keys = this.keys;
} }
if (node.callbacksExecuted) { if (node.callbacksExecuted && !force) {
return; return;
} }
node.callbacksExecuted = true; node.callbacksExecuted = true;
@ -7382,7 +7382,7 @@ SW = {};
SW.tinyboard = { SW.tinyboard = {
isOPContainerThread: true, isOPContainerThread: true,
mayLackJSON: true, mayLackJSON: true,
disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Fourchan thingies', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'], disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'],
detect: function() { detect: function() {
var i, len, m, properties, ref, root, script; var i, len, m, properties, ref, root, script;
ref = $$('script:not([src])', d.head); ref = $$('script:not([src])', d.head);
@ -9367,13 +9367,18 @@ Build = (function() {
sameThread: function(boardID, threadID) { sameThread: function(boardID, threadID) {
return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID; return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID;
}, },
postURL: function(boardID, threadID, postID) { threadURL: function(boardID, threadID) {
if (Build.sameThread(boardID, threadID)) { if (boardID !== g.BOARD.ID) {
return "#p" + postID; return "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID;
} else if (g.VIEW !== 'thread' || +threadID !== g.THREADID) {
return "/" + boardID + "/thread/" + threadID;
} else { } else {
return "/" + boardID + "/thread/" + threadID + "#p" + postID; return '';
} }
}, },
postURL: function(boardID, threadID, postID) {
return (Build.threadURL(boardID, threadID)) + "#p" + postID;
},
parseJSON: function(data, boardID, siteID) { parseJSON: function(data, boardID, siteID) {
var key, o; var key, o;
o = { o = {
@ -9456,7 +9461,7 @@ Build = (function() {
return Build.post(o); return Build.post(o);
}, },
post: function(o) { post: function(o) {
var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, wholePost; var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, url, wholePost;
ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file; ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file;
ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML; ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML;
staticPath = Build.staticPath, gifIcon = Build.gifIcon; staticPath = Build.staticPath, gifIcon = Build.gifIcon;
@ -9479,8 +9484,9 @@ Build = (function() {
capcodeDescription = "a 4chan " + capcodeLong; capcodeDescription = "a 4chan " + capcodeLong;
} }
} }
postLink = Build.postURL(boardID, threadID, ID); url = Build.threadURL(boardID, threadID);
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : "/" + boardID + "/thread/" + threadID + "#q" + ID; postLink = url + "#p" + ID;
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : url + "#q" + ID;
postInfo = { postInfo = {
innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>" innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>"
}; };
@ -9510,12 +9516,14 @@ Build = (function() {
for (i = 0, len = ref1.length; i < len; i++) { for (i = 0, len = ref1.length; i < len; i++) {
quote = ref1[i]; quote = ref1[i];
href = quote.getAttribute('href'); href = quote.getAttribute('href');
if ((href[0] === '#') && !(Build.sameThread(boardID, threadID))) { if (href[0] === '#') {
quote.href = ("/" + boardID + "/thread/" + threadID) + href; if (!Build.sameThread(boardID, threadID)) {
} else if ((match = href.match(/^\/([^\/]+)\/thread\/(\d+)/)) && (Build.sameThread(match[1], match[2]))) { quote.href = Build.threadURL(boardID, threadID) + href;
quote.href = href.match(/(#[^#]*)?$/)[0] || '#'; }
} else if (/^\d+(#|$)/.test(href) && !(g.VIEW === 'thread' && g.BOARD.ID === boardID)) { } else {
quote.href = "/" + boardID + "/thread/" + href; if ((match = quote.href.match(SW.yotsuba.regexp.quotelink)) && (Build.sameThread(match[1], match[2]))) {
quote.href = href.match(/(#[^#]*)?$/)[0] || '#';
}
} }
} }
return container; return container;
@ -17138,12 +17146,6 @@ ExpandComment = (function() {
if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) { if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) {
return; return;
} }
if (g.BOARD.ID === 'g') {
this.callbacks.push(Fourchan.code);
}
if (g.BOARD.ID === 'sci') {
this.callbacks.push(Fourchan.math);
}
return Callbacks.Post.push({ return Callbacks.Post.push({
name: 'Comment Expansion', name: 'Comment Expansion',
cb: this.node cb: this.node
@ -17646,10 +17648,14 @@ Fourchan = (function() {
Fourchan = { Fourchan = {
init: function() { init: function() {
var ref; var ref;
if ((ref = g.VIEW) !== 'index' && ref !== 'thread' && ref !== 'archive') { if (!(Site.software === 'yotsuba' && ((ref = g.VIEW) === 'index' || ref === 'thread' || ref === 'archive'))) {
return; return;
} }
if (g.BOARD.ID === 'g') { BoardConfig.ready(this.initBoard);
return Main.ready(this.initReady);
},
initBoard: function() {
if (g.BOARD.config.code_tags) {
$.on(window, 'prettyprint:cb', function(e) { $.on(window, 'prettyprint:cb', function(e) {
var post, pre; var post, pre;
if (!(post = g.posts[e.detail.ID])) { if (!(post = g.posts[e.detail.ID])) {
@ -17665,11 +17671,15 @@ Fourchan = (function() {
}); });
$.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);'); $.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);');
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /g/ code', name: 'Parse [code] tags',
cb: this.code cb: Fourchan.code
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [code] tags'], true);
});
ExpandComment.callbacks.push(Fourchan.code);
} }
if (g.BOARD.ID === 'sci') { if (g.BOARD.config.math_tags) {
$.global(function() { $.global(function() {
return window.addEventListener('mathjax', function(e) { return window.addEventListener('mathjax', function(e) {
if (window.MathJax) { if (window.MathJax) {
@ -17688,20 +17698,24 @@ Fourchan = (function() {
}, false); }, false);
}); });
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /sci/ math', name: 'Parse [math] tags',
cb: this.math cb: Fourchan.math
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [math] tags'], true);
});
return ExpandComment.callbacks.push(Fourchan.math);
} }
return Main.ready(function() { },
return $.global(function() { initReady: function() {
var j, len, node, ref1; return $.global(function() {
window.clickable_ids = false; var j, len, node, ref;
ref1 = document.querySelectorAll('.posteruid, .capcode'); window.clickable_ids = false;
for (j = 0, len = ref1.length; j < len; j++) { ref = document.querySelectorAll('.posteruid, .capcode');
node = ref1[j]; for (j = 0, len = ref.length; j < len; j++) {
node.removeEventListener('click', window.idClick, false); node = ref[j];
} node.removeEventListener('click', window.idClick, false);
}); }
}); });
}, },
code: function() { code: function() {
@ -25519,9 +25533,6 @@ Main = (function() {
Main = { Main = {
init: function() { init: function() {
var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w; var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w;
if (d.body && !$('title', d.head)) {
return;
}
try { try {
w = window; w = window;
if ($.platform === 'crx') { if ($.platform === 'crx') {

Binary file not shown.

View File

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

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.14.7.0 // @version 1.14.7.1
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.0', VERSION: '1.14.7.1',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5671,12 +5671,12 @@ Callbacks = (function() {
return this[name] = cb; return this[name] = cb;
}; };
Callbacks.prototype.execute = function(node, keys) { Callbacks.prototype.execute = function(node, keys, force) {
var err, errors, i, len, name, ref, ref1, ref2; var err, errors, i, len, name, ref, ref1, ref2;
if (keys == null) { if (keys == null) {
keys = this.keys; keys = this.keys;
} }
if (node.callbacksExecuted) { if (node.callbacksExecuted && !force) {
return; return;
} }
node.callbacksExecuted = true; node.callbacksExecuted = true;
@ -7382,7 +7382,7 @@ SW = {};
SW.tinyboard = { SW.tinyboard = {
isOPContainerThread: true, isOPContainerThread: true,
mayLackJSON: true, mayLackJSON: true,
disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Fourchan thingies', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'], disabledFeatures: ['Board Configuration', 'Normalize URL', 'Captcha Configuration', 'Image Host Rewriting', 'Index Generator', 'Announcement Hiding', 'Resurrect Quotes', 'Quick Reply Personas', 'Quick Reply', 'Cooldown', 'Pass Link', 'Index Generator (Menu)', 'Report Link', 'Delete Link', 'Edit Link', 'Archive Link', 'Quote Inlining', 'Quote Previewing', 'Quote Backlinks', 'File Info Formatting', 'Fappe Tyme', 'Image Expansion', 'Image Expansion (Menu)', 'Comment Expansion', 'Thread Expansion', 'Favicon', 'Quote Threading', 'Thread Stats', 'Thread Updater', 'Mark New IPs', 'Banner', 'Flash Features', 'Reply Pruning'],
detect: function() { detect: function() {
var i, len, m, properties, ref, root, script; var i, len, m, properties, ref, root, script;
ref = $$('script:not([src])', d.head); ref = $$('script:not([src])', d.head);
@ -9367,13 +9367,18 @@ Build = (function() {
sameThread: function(boardID, threadID) { sameThread: function(boardID, threadID) {
return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID; return g.VIEW === 'thread' && g.BOARD.ID === boardID && g.THREADID === +threadID;
}, },
postURL: function(boardID, threadID, postID) { threadURL: function(boardID, threadID) {
if (Build.sameThread(boardID, threadID)) { if (boardID !== g.BOARD.ID) {
return "#p" + postID; return "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID;
} else if (g.VIEW !== 'thread' || +threadID !== g.THREADID) {
return "/" + boardID + "/thread/" + threadID;
} else { } else {
return "/" + boardID + "/thread/" + threadID + "#p" + postID; return '';
} }
}, },
postURL: function(boardID, threadID, postID) {
return (Build.threadURL(boardID, threadID)) + "#p" + postID;
},
parseJSON: function(data, boardID, siteID) { parseJSON: function(data, boardID, siteID) {
var key, o; var key, o;
o = { o = {
@ -9456,7 +9461,7 @@ Build = (function() {
return Build.post(o); return Build.post(o);
}, },
post: function(o) { post: function(o) {
var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, wholePost; var ID, boardID, capcode, capcodeDescription, capcodeLC, capcodeLong, capcodePlural, commentHTML, container, dateText, dateUTC, email, file, fileBlock, fileThumb, fileURL, flag, flagCode, flagCodeTroll, gifIcon, href, i, len, match, name, pass, postClass, postInfo, postLink, protocol, quote, quoteLink, ref, ref1, shortFilename, staticPath, subject, threadID, tripcode, uniqueID, url, wholePost;
ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file; ID = o.ID, threadID = o.threadID, boardID = o.boardID, file = o.file;
ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML; ref = o.info, subject = ref.subject, email = ref.email, name = ref.name, tripcode = ref.tripcode, capcode = ref.capcode, pass = ref.pass, uniqueID = ref.uniqueID, flagCode = ref.flagCode, flagCodeTroll = ref.flagCodeTroll, flag = ref.flag, dateUTC = ref.dateUTC, dateText = ref.dateText, commentHTML = ref.commentHTML;
staticPath = Build.staticPath, gifIcon = Build.gifIcon; staticPath = Build.staticPath, gifIcon = Build.gifIcon;
@ -9479,8 +9484,9 @@ Build = (function() {
capcodeDescription = "a 4chan " + capcodeLong; capcodeDescription = "a 4chan " + capcodeLong;
} }
} }
postLink = Build.postURL(boardID, threadID, ID); url = Build.threadURL(boardID, threadID);
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : "/" + boardID + "/thread/" + threadID + "#q" + ID; postLink = url + "#p" + ID;
quoteLink = Build.sameThread(boardID, threadID) ? "javascript:quote('" + (+ID) + "');" : url + "#q" + ID;
postInfo = { postInfo = {
innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>" innerHTML: "<div class=\"postInfo desktop\" id=\"pi" + E(ID) + "\"><input type=\"checkbox\" name=\"" + E(ID) + "\" value=\"delete\"> " + ((!o.isReply || boardID === "f" || subject) ? "<span class=\"subject\">" + E(subject || "") + "</span> " : "") + "<span class=\"nameBlock" + ((capcode) ? " capcode" + E(capcode) : "") + "\">" + ((email) ? "<a href=\"mailto:" + E(encodeURIComponent(email).replace(/%40/g, "@")) + "\" class=\"useremail\">" : "") + "<span class=\"name" + ((capcode) ? " capcode" : "") + "\">" + E(name) + "</span>" + ((tripcode) ? " <span class=\"postertrip\">" + E(tripcode) + "</span>" : "") + ((o.xa19s) ? " <span class=\"like-score\">" + E(o.xa19s) + "</span>" : "") + ((pass) ? " <span title=\"Pass user since " + E(pass) + "\" class=\"n-pu\"></span>" : "") + ((capcode) ? " <strong class=\"capcode hand id_" + E(capcodeLC) + "\" title=\"Highlight posts by " + E(capcodePlural) + "\">## " + E(capcode) + "</strong>" : "") + ((email) ? "</a>" : "") + ((boardID === "f" && !o.isReply || capcodeDescription) ? "" : " ") + ((capcodeDescription) ? " <img src=\"" + E(staticPath) + E(capcodeLC) + "icon" + E(gifIcon) + "\" alt=\"" + E(capcode) + " Icon\" title=\"This user is " + E(capcodeDescription) + ".\" class=\"identityIcon retina\">" : "") + ((uniqueID && !capcode) ? " <span class=\"posteruid id_" + E(uniqueID) + "\">(ID: <span class=\"hand\" title=\"Highlight posts by this ID\">" + E(uniqueID) + "</span>)</span>" : "") + ((flagCode) ? " <span title=\"" + E(flag) + "\" class=\"flag flag-" + E(flagCode.toLowerCase()) + "\"></span>" : "") + ((flagCodeTroll) ? " <img src=\"" + E(staticPath) + "country/troll/" + E(flagCodeTroll.toLowerCase()) + ".gif\" alt=\"" + E(flagCodeTroll) + "\" title=\"" + E(flag) + "\" class=\"countryFlag\">" : "") + "</span> <span class=\"dateTime\" data-utc=\"" + E(dateUTC) + "\">" + E(dateText) + "</span> <span class=\"postNum" + ((!(boardID === "f" && !o.isReply)) ? " desktop" : "") + "\"><a href=\"" + E(postLink) + "\" title=\"Link to this post\">No.</a><a href=\"" + E(quoteLink) + "\" title=\"Reply to this post\">" + E(ID) + "</a>" + ((o.xa19l && o.isReply) ? " <a data-cmd=\"like-post\" href=\"#\" class=\"like-btn\">Like! ×" + E(o.xa19l) + "</a>" : "") + ((o.isSticky) ? " <img src=\"" + E(staticPath) + "sticky" + E(gifIcon) + "\" alt=\"Sticky\" title=\"Sticky\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"stickyIcon retina\"") + ">" : "") + ((o.isClosed && !o.isArchived) ? " <img src=\"" + E(staticPath) + "closed" + E(gifIcon) + "\" alt=\"Closed\" title=\"Closed\"" + ((boardID === "f") ? " style=\"height: 18px; width: 18px;\"" : " class=\"closedIcon retina\"") + ">" : "") + ((o.isArchived) ? " <img src=\"" + E(staticPath) + "archived" + E(gifIcon) + "\" alt=\"Archived\" title=\"Archived\" class=\"archivedIcon retina\">" : "") + ((!o.isReply && g.VIEW === "index") ? " &nbsp; <span>[<a href=\"/" + E(boardID) + "/thread/" + E(threadID) + "\" class=\"replylink\">Reply</a>]</span>" : "") + "</span></div>"
}; };
@ -9510,12 +9516,14 @@ Build = (function() {
for (i = 0, len = ref1.length; i < len; i++) { for (i = 0, len = ref1.length; i < len; i++) {
quote = ref1[i]; quote = ref1[i];
href = quote.getAttribute('href'); href = quote.getAttribute('href');
if ((href[0] === '#') && !(Build.sameThread(boardID, threadID))) { if (href[0] === '#') {
quote.href = ("/" + boardID + "/thread/" + threadID) + href; if (!Build.sameThread(boardID, threadID)) {
} else if ((match = href.match(/^\/([^\/]+)\/thread\/(\d+)/)) && (Build.sameThread(match[1], match[2]))) { quote.href = Build.threadURL(boardID, threadID) + href;
quote.href = href.match(/(#[^#]*)?$/)[0] || '#'; }
} else if (/^\d+(#|$)/.test(href) && !(g.VIEW === 'thread' && g.BOARD.ID === boardID)) { } else {
quote.href = "/" + boardID + "/thread/" + href; if ((match = quote.href.match(SW.yotsuba.regexp.quotelink)) && (Build.sameThread(match[1], match[2]))) {
quote.href = href.match(/(#[^#]*)?$/)[0] || '#';
}
} }
} }
return container; return container;
@ -17138,12 +17146,6 @@ ExpandComment = (function() {
if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) { if (g.VIEW !== 'index' || !Conf['Comment Expansion'] || Conf['JSON Index']) {
return; return;
} }
if (g.BOARD.ID === 'g') {
this.callbacks.push(Fourchan.code);
}
if (g.BOARD.ID === 'sci') {
this.callbacks.push(Fourchan.math);
}
return Callbacks.Post.push({ return Callbacks.Post.push({
name: 'Comment Expansion', name: 'Comment Expansion',
cb: this.node cb: this.node
@ -17646,10 +17648,14 @@ Fourchan = (function() {
Fourchan = { Fourchan = {
init: function() { init: function() {
var ref; var ref;
if ((ref = g.VIEW) !== 'index' && ref !== 'thread' && ref !== 'archive') { if (!(Site.software === 'yotsuba' && ((ref = g.VIEW) === 'index' || ref === 'thread' || ref === 'archive'))) {
return; return;
} }
if (g.BOARD.ID === 'g') { BoardConfig.ready(this.initBoard);
return Main.ready(this.initReady);
},
initBoard: function() {
if (g.BOARD.config.code_tags) {
$.on(window, 'prettyprint:cb', function(e) { $.on(window, 'prettyprint:cb', function(e) {
var post, pre; var post, pre;
if (!(post = g.posts[e.detail.ID])) { if (!(post = g.posts[e.detail.ID])) {
@ -17665,11 +17671,15 @@ Fourchan = (function() {
}); });
$.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);'); $.globalEval('window.addEventListener(\'prettyprint\', function(e) {\n window.dispatchEvent(new CustomEvent(\'prettyprint:cb\', {\n detail: {\n ID: e.detail.ID,\n i: e.detail.i,\n html: prettyPrintOne(e.detail.html)\n }\n }));\n}, false);');
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /g/ code', name: 'Parse [code] tags',
cb: this.code cb: Fourchan.code
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [code] tags'], true);
});
ExpandComment.callbacks.push(Fourchan.code);
} }
if (g.BOARD.ID === 'sci') { if (g.BOARD.config.math_tags) {
$.global(function() { $.global(function() {
return window.addEventListener('mathjax', function(e) { return window.addEventListener('mathjax', function(e) {
if (window.MathJax) { if (window.MathJax) {
@ -17688,20 +17698,24 @@ Fourchan = (function() {
}, false); }, false);
}); });
Callbacks.Post.push({ Callbacks.Post.push({
name: 'Parse /sci/ math', name: 'Parse [math] tags',
cb: this.math cb: Fourchan.math
}); });
g.posts.forEach(function(post) {
return Callbacks.Post.execute(post, ['Parse [math] tags'], true);
});
return ExpandComment.callbacks.push(Fourchan.math);
} }
return Main.ready(function() { },
return $.global(function() { initReady: function() {
var j, len, node, ref1; return $.global(function() {
window.clickable_ids = false; var j, len, node, ref;
ref1 = document.querySelectorAll('.posteruid, .capcode'); window.clickable_ids = false;
for (j = 0, len = ref1.length; j < len; j++) { ref = document.querySelectorAll('.posteruid, .capcode');
node = ref1[j]; for (j = 0, len = ref.length; j < len; j++) {
node.removeEventListener('click', window.idClick, false); node = ref[j];
} node.removeEventListener('click', window.idClick, false);
}); }
}); });
}, },
code: function() { code: function() {
@ -25519,9 +25533,6 @@ Main = (function() {
Main = { Main = {
init: function() { init: function() {
var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w; var db, flatten, i, items, j, k, key, len, ref, ref1, ref2, w;
if (d.body && !$('title', d.head)) {
return;
}
try { try {
w = window; w = window;
if ($.platform === 'crx') { if ($.platform === 'crx') {

Binary file not shown.

View File

@ -3,7 +3,7 @@
"4chan-x@4chan-x.net": { "4chan-x@4chan-x.net": {
"updates": [ "updates": [
{ {
"version": "1.14.7.0", "version": "1.14.7.1",
"update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx" "update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx"
} }
] ]

View File

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

View File

@ -3,7 +3,7 @@
"4chan-x@4chan-x.net": { "4chan-x@4chan-x.net": {
"updates": [ "updates": [
{ {
"version": "1.14.7.0", "version": "1.14.7.1",
"update_link": "https://www.4chan-x.net/builds/4chan-X.crx" "update_link": "https://www.4chan-x.net/builds/4chan-X.crx"
} }
] ]

View File

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

View File

@ -1,4 +1,4 @@
{ {
"version": "1.14.7.0", "version": "1.14.7.1",
"date": "2019-04-07T09:30:05.377Z" "date": "2019-04-09T17:45:20.859Z"
} }