Release 4chan X v1.7.14.
This commit is contained in:
parent
c3d521de82
commit
c7575822e8
@ -1,3 +1,6 @@
|
|||||||
|
### v1.7.14
|
||||||
|
*2014-04-19*
|
||||||
|
|
||||||
**ccd0**
|
**ccd0**
|
||||||
- Use new URLs.
|
- Use new URLs.
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.7.13 - 2014-04-19
|
* 4chan X - Version 1.7.14 - 2014-04-19
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.7.13
|
// @version 1.7.14
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.7.13
|
// @version 1.7.14
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.7.13 - 2014-04-19
|
* 4chan X - Version 1.7.14 - 2014-04-19
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -371,7 +371,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.7.13',
|
VERSION: '1.7.14',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -1110,7 +1110,7 @@
|
|||||||
size *= 1024;
|
size *= 1024;
|
||||||
}
|
}
|
||||||
this.file.sizeInBytes = size;
|
this.file.sizeInBytes = size;
|
||||||
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/thumb/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
||||||
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
||||||
this.file.isVideo = /webm$/i.test(this.file.URL);
|
this.file.isVideo = /webm$/i.test(this.file.URL);
|
||||||
if (this.file.isImage || this.file.isVideo) {
|
if (this.file.isImage || this.file.isVideo) {
|
||||||
@ -3092,12 +3092,12 @@
|
|||||||
o.file = {
|
o.file = {
|
||||||
name: data.filename + data.ext,
|
name: data.filename + data.ext,
|
||||||
timestamp: "" + data.tim + data.ext,
|
timestamp: "" + data.tim + data.ext,
|
||||||
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/src/" + data.filename + data.ext : "//i.4cdn.org/" + boardID + "/src/" + data.tim + data.ext,
|
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/" + data.filename + data.ext : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
|
||||||
height: data.h,
|
height: data.h,
|
||||||
width: data.w,
|
width: data.w,
|
||||||
MD5: data.md5,
|
MD5: data.md5,
|
||||||
size: data.fsize,
|
size: data.fsize,
|
||||||
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/" + data.tim + "s.jpg",
|
||||||
theight: data.tn_h,
|
theight: data.tn_h,
|
||||||
twidth: data.tn_w,
|
twidth: data.tn_w,
|
||||||
isSpoiler: !!data.spoiler,
|
isSpoiler: !!data.spoiler,
|
||||||
@ -3188,14 +3188,14 @@
|
|||||||
pageIcon = '';
|
pageIcon = '';
|
||||||
}
|
}
|
||||||
if (isOP && g.VIEW === 'index') {
|
if (isOP && g.VIEW === 'index') {
|
||||||
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
replyLink = " <span>[<a href='/" + boardID + "/thread/" + threadID + "' class=replylink>Reply</a>]</span>";
|
||||||
} else {
|
} else {
|
||||||
replyLink = '';
|
replyLink = '';
|
||||||
}
|
}
|
||||||
container = $.el('div', {
|
container = $.el('div', {
|
||||||
id: "pc" + postID,
|
id: "pc" + postID,
|
||||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
||||||
innerHTML: "" + (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + "<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcodeIcon === 'admin_highlight' ? ' highlightPost' : '') + "'>" + (isOP ? fileHTML : '') + "<div class='postInfo' id=pi" + postID + "><input type=checkbox name=" + postID + " value=delete>" + ' ' + "<span class=subject>" + (subject || '') + "</span>" + ' ' + "<span class='nameBlock" + capcodeClass + "'>" + emailStart + "<span class=name>" + (name || '') + "</span>" + (tripcode + capcodeStart + emailEnd + capcodeIcon + userID + flag) + "</span>" + " " + "<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span>" + ' ' + "<span class='postNum'><a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a><a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>" + (pageIcon + sticky + closed + replyLink) + "</span></div>" + (isOP ? '' : fileHTML) + "<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote>" + ' ' + "</div>"
|
innerHTML: "" + (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + "<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcodeIcon === 'admin_highlight' ? ' highlightPost' : '') + "'>" + (isOP ? fileHTML : '') + "<div class='postInfo' id=pi" + postID + "><input type=checkbox name=" + postID + " value=delete>" + ' ' + "<span class=subject>" + (subject || '') + "</span>" + ' ' + "<span class='nameBlock" + capcodeClass + "'>" + emailStart + "<span class=name>" + (name || '') + "</span>" + (tripcode + capcodeStart + emailEnd + capcodeIcon + userID + flag) + "</span>" + " " + "<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span>" + ' ' + "<span class='postNum'><a href=" + ("/" + boardID + "/thread/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a><a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/thread/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>" + (pageIcon + sticky + closed + replyLink) + "</span></div>" + (isOP ? '' : fileHTML) + "<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote>" + ' ' + "</div>"
|
||||||
});
|
});
|
||||||
_ref = $$('.quotelink', container);
|
_ref = $$('.quotelink', container);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -3204,7 +3204,7 @@
|
|||||||
if (href[0] === '/') {
|
if (href[0] === '/') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
quote.href = "/" + boardID + "/res/" + href;
|
quote.href = "/" + boardID + "/thread/" + href;
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
@ -3219,7 +3219,7 @@
|
|||||||
return $.el('a', {
|
return $.el('a', {
|
||||||
className: 'summary',
|
className: 'summary',
|
||||||
textContent: text.join(' '),
|
textContent: text.join(' '),
|
||||||
href: "/" + boardID + "/res/" + threadID
|
href: "/" + boardID + "/thread/" + threadID
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
thread: function(board, data, full) {
|
thread: function(board, data, full) {
|
||||||
@ -3350,7 +3350,7 @@
|
|||||||
}
|
}
|
||||||
root.textContent = "Loading post No." + postID + "...";
|
root.textContent = "Loading post No." + postID + "...";
|
||||||
if (threadID) {
|
if (threadID) {
|
||||||
return $.cache("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", function() {
|
return $.cache("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", function() {
|
||||||
return Get.fetchedPost(this, boardID, threadID, postID, root, context);
|
return Get.fetchedPost(this, boardID, threadID, postID, root, context);
|
||||||
});
|
});
|
||||||
} else if (url = Redirect.to('post', {
|
} else if (url = Redirect.to('post', {
|
||||||
@ -3483,7 +3483,7 @@
|
|||||||
width: data.media.media_w,
|
width: data.media.media_w,
|
||||||
MD5: data.media.media_hash,
|
MD5: data.media.media_hash,
|
||||||
size: data.media.media_size,
|
size: data.media.media_size,
|
||||||
turl: data.media.thumb_link || ("//t.4cdn.org/" + boardID + "/thumb/" + data.media.preview_orig),
|
turl: data.media.thumb_link || ("//t.4cdn.org/" + boardID + "/" + data.media.preview_orig),
|
||||||
theight: data.media.preview_h,
|
theight: data.media.preview_h,
|
||||||
twidth: data.media.preview_w,
|
twidth: data.media.preview_w,
|
||||||
isSpoiler: data.media.spoiler === '1'
|
isSpoiler: data.media.spoiler === '1'
|
||||||
@ -4918,7 +4918,7 @@
|
|||||||
postID: this.ID
|
postID: this.ID
|
||||||
});
|
});
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + this.board + "/res/" + this.thread + "#p" + this,
|
href: "/" + this.board + "/thread/" + this.thread + "#p" + this,
|
||||||
className: this.isHidden ? 'filtered backlink' : 'backlink',
|
className: this.isHidden ? 'filtered backlink' : 'backlink',
|
||||||
textContent: (QuoteBacklink.funk(this.ID)) + (markYours ? '\u00A0(You)' : '')
|
textContent: (QuoteBacklink.funk(this.ID)) + (markYours ? '\u00A0(You)' : '')
|
||||||
});
|
});
|
||||||
@ -5576,13 +5576,13 @@
|
|||||||
if (post = g.posts[quoteID]) {
|
if (post = g.posts[quoteID]) {
|
||||||
if (!post.isDead) {
|
if (!post.isDead) {
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + boardID + "/res/" + post.thread + "#p" + postID,
|
href: "/" + boardID + "/thread/" + post.thread + "#p" + postID,
|
||||||
className: 'quotelink',
|
className: 'quotelink',
|
||||||
textContent: quote
|
textContent: quote
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + boardID + "/res/" + post.thread + "#p" + postID,
|
href: "/" + boardID + "/thread/" + post.thread + "#p" + postID,
|
||||||
className: 'quotelink deadlink',
|
className: 'quotelink deadlink',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
textContent: "" + quote + "\u00A0(Dead)"
|
textContent: "" + quote + "\u00A0(Dead)"
|
||||||
@ -6512,7 +6512,7 @@
|
|||||||
isReply: isReply,
|
isReply: isReply,
|
||||||
threadID: threadID
|
threadID: threadID
|
||||||
});
|
});
|
||||||
URL = threadID === postID ? "/" + g.BOARD + "/res/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/res/" + threadID + "#p" + postID : void 0;
|
URL = threadID === postID ? "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
||||||
if (URL) {
|
if (URL) {
|
||||||
if (Conf['Open Post in New Tab']) {
|
if (Conf['Open Post in New Tab']) {
|
||||||
$.open(URL);
|
$.open(URL);
|
||||||
@ -7535,7 +7535,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.ajax("//a.4cdn.org/" + post.board + "/res/" + post.thread + ".json", {
|
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var i, postObj, posts;
|
var i, postObj, posts;
|
||||||
if (this.status !== 200) {
|
if (this.status !== 200) {
|
||||||
@ -7925,7 +7925,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeoutID = setTimeout(ImageExpand.expand, 10000, post);
|
timeoutID = setTimeout(ImageExpand.expand, 10000, post);
|
||||||
return $.ajax("//a.4cdn.org/" + post.board + "/res/" + post.thread + ".json", {
|
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var postObj, _i, _len, _ref;
|
var postObj, _i, _len, _ref;
|
||||||
if (this.status !== 200) {
|
if (this.status !== 200) {
|
||||||
@ -8091,7 +8091,7 @@
|
|||||||
return _this.src = post.file.URL + '?' + Date.now();
|
return _this.src = post.file.URL + '?' + Date.now();
|
||||||
};
|
};
|
||||||
})(this)), 3000);
|
})(this)), 3000);
|
||||||
return $.ajax("//a.4cdn.org/" + post.board + "/res/" + post.thread + ".json", {
|
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var postObj, _i, _len, _ref;
|
var postObj, _i, _len, _ref;
|
||||||
if (this.status !== 200) {
|
if (this.status !== 200) {
|
||||||
@ -9646,7 +9646,7 @@
|
|||||||
if ((_ref = ThreadUpdater.req) != null) {
|
if ((_ref = ThreadUpdater.req) != null) {
|
||||||
_ref.abort();
|
_ref.abort();
|
||||||
}
|
}
|
||||||
url = "//a.4cdn.org/" + ThreadUpdater.thread.board + "/res/" + ThreadUpdater.thread + ".json";
|
url = "//a.4cdn.org/" + ThreadUpdater.thread.board + "/thread/" + ThreadUpdater.thread + ".json";
|
||||||
return ThreadUpdater.req = $.ajax(url, {
|
return ThreadUpdater.req = $.ajax(url, {
|
||||||
onloadend: ThreadUpdater.cb.load
|
onloadend: ThreadUpdater.cb.load
|
||||||
}, {
|
}, {
|
||||||
@ -9961,7 +9961,7 @@
|
|||||||
}
|
}
|
||||||
fetchCount = ThreadWatcher.fetchCount;
|
fetchCount = ThreadWatcher.fetchCount;
|
||||||
fetchCount.fetching++;
|
fetchCount.fetching++;
|
||||||
return $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
return $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
|
||||||
onloadend: function() {
|
onloadend: function() {
|
||||||
var status;
|
var status;
|
||||||
fetchCount.fetched++;
|
fetchCount.fetched++;
|
||||||
@ -10029,7 +10029,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
link = $.el('a', {
|
link = $.el('a', {
|
||||||
href: href || ("/" + boardID + "/res/" + threadID),
|
href: href || ("/" + boardID + "/thread/" + threadID),
|
||||||
textContent: data.excerpt,
|
textContent: data.excerpt,
|
||||||
title: data.excerpt
|
title: data.excerpt
|
||||||
});
|
});
|
||||||
@ -11097,7 +11097,7 @@
|
|||||||
if (href[0] === '/') {
|
if (href[0] === '/') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
quote.href = "/" + post.board + "/res/" + href;
|
quote.href = "/" + post.board + "/thread/" + href;
|
||||||
}
|
}
|
||||||
post.nodes.shortComment = comment;
|
post.nodes.shortComment = comment;
|
||||||
$.replace(comment, clone);
|
$.replace(comment, clone);
|
||||||
@ -11187,7 +11187,7 @@
|
|||||||
var status;
|
var status;
|
||||||
ExpandThread.statuses[thread] = status = {};
|
ExpandThread.statuses[thread] = status = {};
|
||||||
a.textContent = ExpandThread.text.apply(ExpandThread, ['...'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
a.textContent = ExpandThread.text.apply(ExpandThread, ['...'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
||||||
return status.req = $.cache("//a.4cdn.org/" + thread.board + "/res/" + thread + ".json", function() {
|
return status.req = $.cache("//a.4cdn.org/" + thread.board + "/thread/" + thread + ".json", function() {
|
||||||
delete status.req;
|
delete status.req;
|
||||||
return ExpandThread.parse(this, thread, a);
|
return ExpandThread.parse(this, thread, a);
|
||||||
});
|
});
|
||||||
@ -11533,18 +11533,18 @@
|
|||||||
op = Build.postFromObject(thread, g.BOARD);
|
op = Build.postFromObject(thread, g.BOARD);
|
||||||
posts.push(op);
|
posts.push(op);
|
||||||
replylink = $.el('a', {
|
replylink = $.el('a', {
|
||||||
href: "res/" + threadID,
|
href: "thread/" + threadID,
|
||||||
className: 'replylink',
|
className: 'replylink',
|
||||||
textContent: 'Reply'
|
textContent: 'Reply'
|
||||||
});
|
});
|
||||||
postlink = $.el('div', {
|
postlink = $.el('div', {
|
||||||
className: "postLink mobile",
|
className: "postLink mobile",
|
||||||
innerHTML: "<a href=\"res/" + threadID + "\" class=\"button\">View Thread</a>"
|
innerHTML: "<a href=\"thread/" + threadID + "\" class=\"button\">View Thread</a>"
|
||||||
});
|
});
|
||||||
if (omitted_posts) {
|
if (omitted_posts) {
|
||||||
posts.push($.el('span', {
|
posts.push($.el('span', {
|
||||||
className: 'summary desktop',
|
className: 'summary desktop',
|
||||||
innerHTML: "" + omitted_posts + " posts " + (omitted_images ? "and " + omitted_images + " image replies" : void 0) + " omitted. Click <a class=\"replylink\" href=\"res/" + threadID + "\">here</a> to view."
|
innerHTML: "" + omitted_posts + " posts " + (omitted_images ? "and " + omitted_images + " image replies" : void 0) + " omitted. Click <a class=\"replylink\" href=\"thread/" + threadID + "\">here</a> to view."
|
||||||
}));
|
}));
|
||||||
$.prepend(postlink, $.el('span', {
|
$.prepend(postlink, $.el('span', {
|
||||||
className: 'info',
|
className: 'info',
|
||||||
@ -11973,7 +11973,7 @@
|
|||||||
if (g.VIEW !== 'index') {
|
if (g.VIEW !== 'index') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
url = "/" + thread.board + "/res/" + thread;
|
url = "/" + thread.board + "/thread/" + thread;
|
||||||
if (tab) {
|
if (tab) {
|
||||||
return $.open(url);
|
return $.open(url);
|
||||||
} else {
|
} else {
|
||||||
@ -12638,7 +12638,7 @@
|
|||||||
} else {
|
} else {
|
||||||
Navigate.updateSFW(Favicon.SFW);
|
Navigate.updateSFW(Favicon.SFW);
|
||||||
load = Navigate.load;
|
load = Navigate.load;
|
||||||
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
|
||||||
onabort: load,
|
onabort: load,
|
||||||
onloadend: load
|
onloadend: load
|
||||||
});
|
});
|
||||||
@ -13266,7 +13266,7 @@
|
|||||||
data = {
|
data = {
|
||||||
isReply: true,
|
isReply: true,
|
||||||
file: {
|
file: {
|
||||||
URL: '//i.4cdn.org/g/src/1334437723720.jpg',
|
URL: '//i.4cdn.org/g/1334437723720.jpg',
|
||||||
name: 'd9bb2efc98dd0df141a94399ff5880b7.jpg',
|
name: 'd9bb2efc98dd0df141a94399ff5880b7.jpg',
|
||||||
size: '276 KB',
|
size: '276 KB',
|
||||||
sizeInBytes: 276 * 1024,
|
sizeInBytes: 276 * 1024,
|
||||||
@ -13366,7 +13366,7 @@
|
|||||||
if (g.VIEW === 'thread') {
|
if (g.VIEW === 'thread') {
|
||||||
g.THREADID = +pathname[3];
|
g.THREADID = +pathname[3];
|
||||||
if (pathname.length > 4) {
|
if (pathname.length > 4) {
|
||||||
history.replaceState(null, '', pathname.slice(0, 4).join('/'));
|
history.replaceState(null, '', pathname.slice(0, 4).join('/') + location.hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flatten = function(parent, obj) {
|
flatten = function(parent, obj) {
|
||||||
|
|||||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.7.13",
|
"version": "1.7.14",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"icons": {
|
"icons": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.7.13 - 2014-04-19
|
* 4chan X - Version 1.7.14 - 2014-04-19
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -347,7 +347,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.7.13',
|
VERSION: '1.7.14',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -1146,7 +1146,7 @@
|
|||||||
size *= 1024;
|
size *= 1024;
|
||||||
}
|
}
|
||||||
this.file.sizeInBytes = size;
|
this.file.sizeInBytes = size;
|
||||||
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/thumb/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
||||||
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
||||||
this.file.isVideo = /webm$/i.test(this.file.URL);
|
this.file.isVideo = /webm$/i.test(this.file.URL);
|
||||||
if (this.file.isImage || this.file.isVideo) {
|
if (this.file.isImage || this.file.isVideo) {
|
||||||
@ -3133,12 +3133,12 @@
|
|||||||
o.file = {
|
o.file = {
|
||||||
name: data.filename + data.ext,
|
name: data.filename + data.ext,
|
||||||
timestamp: "" + data.tim + data.ext,
|
timestamp: "" + data.tim + data.ext,
|
||||||
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/src/" + data.filename + data.ext : "//i.4cdn.org/" + boardID + "/src/" + data.tim + data.ext,
|
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/" + data.filename + data.ext : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
|
||||||
height: data.h,
|
height: data.h,
|
||||||
width: data.w,
|
width: data.w,
|
||||||
MD5: data.md5,
|
MD5: data.md5,
|
||||||
size: data.fsize,
|
size: data.fsize,
|
||||||
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/thumb/" + data.tim + "s.jpg",
|
turl: "//" + (Build.thumbRotate()) + ".t.4cdn.org/" + boardID + "/" + data.tim + "s.jpg",
|
||||||
theight: data.tn_h,
|
theight: data.tn_h,
|
||||||
twidth: data.tn_w,
|
twidth: data.tn_w,
|
||||||
isSpoiler: !!data.spoiler,
|
isSpoiler: !!data.spoiler,
|
||||||
@ -3229,14 +3229,14 @@
|
|||||||
pageIcon = '';
|
pageIcon = '';
|
||||||
}
|
}
|
||||||
if (isOP && g.VIEW === 'index') {
|
if (isOP && g.VIEW === 'index') {
|
||||||
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
replyLink = " <span>[<a href='/" + boardID + "/thread/" + threadID + "' class=replylink>Reply</a>]</span>";
|
||||||
} else {
|
} else {
|
||||||
replyLink = '';
|
replyLink = '';
|
||||||
}
|
}
|
||||||
container = $.el('div', {
|
container = $.el('div', {
|
||||||
id: "pc" + postID,
|
id: "pc" + postID,
|
||||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
||||||
innerHTML: "" + (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + "<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcodeIcon === 'admin_highlight' ? ' highlightPost' : '') + "'>" + (isOP ? fileHTML : '') + "<div class='postInfo' id=pi" + postID + "><input type=checkbox name=" + postID + " value=delete>" + ' ' + "<span class=subject>" + (subject || '') + "</span>" + ' ' + "<span class='nameBlock" + capcodeClass + "'>" + emailStart + "<span class=name>" + (name || '') + "</span>" + (tripcode + capcodeStart + emailEnd + capcodeIcon + userID + flag) + "</span>" + " " + "<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span>" + ' ' + "<span class='postNum'><a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a><a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>" + (pageIcon + sticky + closed + replyLink) + "</span></div>" + (isOP ? '' : fileHTML) + "<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote>" + ' ' + "</div>"
|
innerHTML: "" + (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + "<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcodeIcon === 'admin_highlight' ? ' highlightPost' : '') + "'>" + (isOP ? fileHTML : '') + "<div class='postInfo' id=pi" + postID + "><input type=checkbox name=" + postID + " value=delete>" + ' ' + "<span class=subject>" + (subject || '') + "</span>" + ' ' + "<span class='nameBlock" + capcodeClass + "'>" + emailStart + "<span class=name>" + (name || '') + "</span>" + (tripcode + capcodeStart + emailEnd + capcodeIcon + userID + flag) + "</span>" + " " + "<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span>" + ' ' + "<span class='postNum'><a href=" + ("/" + boardID + "/thread/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a><a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/thread/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>" + (pageIcon + sticky + closed + replyLink) + "</span></div>" + (isOP ? '' : fileHTML) + "<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote>" + ' ' + "</div>"
|
||||||
});
|
});
|
||||||
_ref = $$('.quotelink', container);
|
_ref = $$('.quotelink', container);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -3245,7 +3245,7 @@
|
|||||||
if (href[0] === '/') {
|
if (href[0] === '/') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
quote.href = "/" + boardID + "/res/" + href;
|
quote.href = "/" + boardID + "/thread/" + href;
|
||||||
}
|
}
|
||||||
return container;
|
return container;
|
||||||
},
|
},
|
||||||
@ -3260,7 +3260,7 @@
|
|||||||
return $.el('a', {
|
return $.el('a', {
|
||||||
className: 'summary',
|
className: 'summary',
|
||||||
textContent: text.join(' '),
|
textContent: text.join(' '),
|
||||||
href: "/" + boardID + "/res/" + threadID
|
href: "/" + boardID + "/thread/" + threadID
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
thread: function(board, data, full) {
|
thread: function(board, data, full) {
|
||||||
@ -3391,7 +3391,7 @@
|
|||||||
}
|
}
|
||||||
root.textContent = "Loading post No." + postID + "...";
|
root.textContent = "Loading post No." + postID + "...";
|
||||||
if (threadID) {
|
if (threadID) {
|
||||||
return $.cache("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", function() {
|
return $.cache("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", function() {
|
||||||
return Get.fetchedPost(this, boardID, threadID, postID, root, context);
|
return Get.fetchedPost(this, boardID, threadID, postID, root, context);
|
||||||
});
|
});
|
||||||
} else if (url = Redirect.to('post', {
|
} else if (url = Redirect.to('post', {
|
||||||
@ -3524,7 +3524,7 @@
|
|||||||
width: data.media.media_w,
|
width: data.media.media_w,
|
||||||
MD5: data.media.media_hash,
|
MD5: data.media.media_hash,
|
||||||
size: data.media.media_size,
|
size: data.media.media_size,
|
||||||
turl: data.media.thumb_link || ("//t.4cdn.org/" + boardID + "/thumb/" + data.media.preview_orig),
|
turl: data.media.thumb_link || ("//t.4cdn.org/" + boardID + "/" + data.media.preview_orig),
|
||||||
theight: data.media.preview_h,
|
theight: data.media.preview_h,
|
||||||
twidth: data.media.preview_w,
|
twidth: data.media.preview_w,
|
||||||
isSpoiler: data.media.spoiler === '1'
|
isSpoiler: data.media.spoiler === '1'
|
||||||
@ -4952,7 +4952,7 @@
|
|||||||
postID: this.ID
|
postID: this.ID
|
||||||
});
|
});
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + this.board + "/res/" + this.thread + "#p" + this,
|
href: "/" + this.board + "/thread/" + this.thread + "#p" + this,
|
||||||
className: this.isHidden ? 'filtered backlink' : 'backlink',
|
className: this.isHidden ? 'filtered backlink' : 'backlink',
|
||||||
textContent: (QuoteBacklink.funk(this.ID)) + (markYours ? '\u00A0(You)' : '')
|
textContent: (QuoteBacklink.funk(this.ID)) + (markYours ? '\u00A0(You)' : '')
|
||||||
});
|
});
|
||||||
@ -5610,13 +5610,13 @@
|
|||||||
if (post = g.posts[quoteID]) {
|
if (post = g.posts[quoteID]) {
|
||||||
if (!post.isDead) {
|
if (!post.isDead) {
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + boardID + "/res/" + post.thread + "#p" + postID,
|
href: "/" + boardID + "/thread/" + post.thread + "#p" + postID,
|
||||||
className: 'quotelink',
|
className: 'quotelink',
|
||||||
textContent: quote
|
textContent: quote
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
href: "/" + boardID + "/res/" + post.thread + "#p" + postID,
|
href: "/" + boardID + "/thread/" + post.thread + "#p" + postID,
|
||||||
className: 'quotelink deadlink',
|
className: 'quotelink deadlink',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
textContent: "" + quote + "\u00A0(Dead)"
|
textContent: "" + quote + "\u00A0(Dead)"
|
||||||
@ -6537,7 +6537,7 @@
|
|||||||
isReply: isReply,
|
isReply: isReply,
|
||||||
threadID: threadID
|
threadID: threadID
|
||||||
});
|
});
|
||||||
URL = threadID === postID ? "/" + g.BOARD + "/res/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/res/" + threadID + "#p" + postID : void 0;
|
URL = threadID === postID ? "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
|
||||||
if (URL) {
|
if (URL) {
|
||||||
if (Conf['Open Post in New Tab']) {
|
if (Conf['Open Post in New Tab']) {
|
||||||
$.open(URL);
|
$.open(URL);
|
||||||
@ -7554,7 +7554,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.ajax("//a.4cdn.org/" + post.board + "/res/" + post.thread + ".json", {
|
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||||
onload: function() {
|
onload: function() {
|
||||||
var i, postObj, posts;
|
var i, postObj, posts;
|
||||||
if (this.status !== 200) {
|
if (this.status !== 200) {
|
||||||
@ -9643,7 +9643,7 @@
|
|||||||
if ((_ref = ThreadUpdater.req) != null) {
|
if ((_ref = ThreadUpdater.req) != null) {
|
||||||
_ref.abort();
|
_ref.abort();
|
||||||
}
|
}
|
||||||
url = "//a.4cdn.org/" + ThreadUpdater.thread.board + "/res/" + ThreadUpdater.thread + ".json";
|
url = "//a.4cdn.org/" + ThreadUpdater.thread.board + "/thread/" + ThreadUpdater.thread + ".json";
|
||||||
return ThreadUpdater.req = $.ajax(url, {
|
return ThreadUpdater.req = $.ajax(url, {
|
||||||
onloadend: ThreadUpdater.cb.load
|
onloadend: ThreadUpdater.cb.load
|
||||||
}, {
|
}, {
|
||||||
@ -9958,7 +9958,7 @@
|
|||||||
}
|
}
|
||||||
fetchCount = ThreadWatcher.fetchCount;
|
fetchCount = ThreadWatcher.fetchCount;
|
||||||
fetchCount.fetching++;
|
fetchCount.fetching++;
|
||||||
return $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
return $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
|
||||||
onloadend: function() {
|
onloadend: function() {
|
||||||
var status;
|
var status;
|
||||||
fetchCount.fetched++;
|
fetchCount.fetched++;
|
||||||
@ -10026,7 +10026,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
link = $.el('a', {
|
link = $.el('a', {
|
||||||
href: href || ("/" + boardID + "/res/" + threadID),
|
href: href || ("/" + boardID + "/thread/" + threadID),
|
||||||
textContent: data.excerpt,
|
textContent: data.excerpt,
|
||||||
title: data.excerpt
|
title: data.excerpt
|
||||||
});
|
});
|
||||||
@ -11100,7 +11100,7 @@
|
|||||||
if (href[0] === '/') {
|
if (href[0] === '/') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
quote.href = "/" + post.board + "/res/" + href;
|
quote.href = "/" + post.board + "/thread/" + href;
|
||||||
}
|
}
|
||||||
post.nodes.shortComment = comment;
|
post.nodes.shortComment = comment;
|
||||||
$.replace(comment, clone);
|
$.replace(comment, clone);
|
||||||
@ -11190,7 +11190,7 @@
|
|||||||
var status;
|
var status;
|
||||||
ExpandThread.statuses[thread] = status = {};
|
ExpandThread.statuses[thread] = status = {};
|
||||||
a.textContent = ExpandThread.text.apply(ExpandThread, ['...'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
a.textContent = ExpandThread.text.apply(ExpandThread, ['...'].concat(__slice.call(a.textContent.match(/\d+/g))));
|
||||||
return status.req = $.cache("//a.4cdn.org/" + thread.board + "/res/" + thread + ".json", function() {
|
return status.req = $.cache("//a.4cdn.org/" + thread.board + "/thread/" + thread + ".json", function() {
|
||||||
delete status.req;
|
delete status.req;
|
||||||
return ExpandThread.parse(this, thread, a);
|
return ExpandThread.parse(this, thread, a);
|
||||||
});
|
});
|
||||||
@ -11536,18 +11536,18 @@
|
|||||||
op = Build.postFromObject(thread, g.BOARD);
|
op = Build.postFromObject(thread, g.BOARD);
|
||||||
posts.push(op);
|
posts.push(op);
|
||||||
replylink = $.el('a', {
|
replylink = $.el('a', {
|
||||||
href: "res/" + threadID,
|
href: "thread/" + threadID,
|
||||||
className: 'replylink',
|
className: 'replylink',
|
||||||
textContent: 'Reply'
|
textContent: 'Reply'
|
||||||
});
|
});
|
||||||
postlink = $.el('div', {
|
postlink = $.el('div', {
|
||||||
className: "postLink mobile",
|
className: "postLink mobile",
|
||||||
innerHTML: "<a href=\"res/" + threadID + "\" class=\"button\">View Thread</a>"
|
innerHTML: "<a href=\"thread/" + threadID + "\" class=\"button\">View Thread</a>"
|
||||||
});
|
});
|
||||||
if (omitted_posts) {
|
if (omitted_posts) {
|
||||||
posts.push($.el('span', {
|
posts.push($.el('span', {
|
||||||
className: 'summary desktop',
|
className: 'summary desktop',
|
||||||
innerHTML: "" + omitted_posts + " posts " + (omitted_images ? "and " + omitted_images + " image replies" : void 0) + " omitted. Click <a class=\"replylink\" href=\"res/" + threadID + "\">here</a> to view."
|
innerHTML: "" + omitted_posts + " posts " + (omitted_images ? "and " + omitted_images + " image replies" : void 0) + " omitted. Click <a class=\"replylink\" href=\"thread/" + threadID + "\">here</a> to view."
|
||||||
}));
|
}));
|
||||||
$.prepend(postlink, $.el('span', {
|
$.prepend(postlink, $.el('span', {
|
||||||
className: 'info',
|
className: 'info',
|
||||||
@ -11976,7 +11976,7 @@
|
|||||||
if (g.VIEW !== 'index') {
|
if (g.VIEW !== 'index') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
url = "/" + thread.board + "/res/" + thread;
|
url = "/" + thread.board + "/thread/" + thread;
|
||||||
if (tab) {
|
if (tab) {
|
||||||
return $.open(url);
|
return $.open(url);
|
||||||
} else {
|
} else {
|
||||||
@ -12641,7 +12641,7 @@
|
|||||||
} else {
|
} else {
|
||||||
Navigate.updateSFW(Favicon.SFW);
|
Navigate.updateSFW(Favicon.SFW);
|
||||||
load = Navigate.load;
|
load = Navigate.load;
|
||||||
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/res/" + threadID + ".json", {
|
Navigate.req = $.ajax("//a.4cdn.org/" + boardID + "/thread/" + threadID + ".json", {
|
||||||
onabort: load,
|
onabort: load,
|
||||||
onloadend: load
|
onloadend: load
|
||||||
});
|
});
|
||||||
@ -13266,7 +13266,7 @@
|
|||||||
data = {
|
data = {
|
||||||
isReply: true,
|
isReply: true,
|
||||||
file: {
|
file: {
|
||||||
URL: '//i.4cdn.org/g/src/1334437723720.jpg',
|
URL: '//i.4cdn.org/g/1334437723720.jpg',
|
||||||
name: 'd9bb2efc98dd0df141a94399ff5880b7.jpg',
|
name: 'd9bb2efc98dd0df141a94399ff5880b7.jpg',
|
||||||
size: '276 KB',
|
size: '276 KB',
|
||||||
sizeInBytes: 276 * 1024,
|
sizeInBytes: 276 * 1024,
|
||||||
@ -13366,7 +13366,7 @@
|
|||||||
if (g.VIEW === 'thread') {
|
if (g.VIEW === 'thread') {
|
||||||
g.THREADID = +pathname[3];
|
g.THREADID = +pathname[3];
|
||||||
if (pathname.length > 4) {
|
if (pathname.length > 4) {
|
||||||
history.replaceState(null, '', pathname.slice(0, 4).join('/'));
|
history.replaceState(null, '', pathname.slice(0, 4).join('/') + location.hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flatten = function(parent, obj) {
|
flatten = function(parent, obj) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/crx.crx' version='1.7.13' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/crx.crx' version='1.7.14' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "4chan-X",
|
"name": "4chan-X",
|
||||||
"version": "1.7.13",
|
"version": "1.7.14",
|
||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user