Release 4chan X v1.8.8.3.
This commit is contained in:
parent
4649639215
commit
36fad05cab
@ -1,3 +1,6 @@
|
||||
### v1.8.8.3
|
||||
*2014-08-02*
|
||||
|
||||
**ccd0**, **Zixaphir**
|
||||
- Bug fixes.
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.8.8.2 - 2014-07-29
|
||||
* 4chan X - Version 1.8.8.3 - 2014-08-02
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.8.2
|
||||
// @version 1.8.8.3
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.8.2
|
||||
// @version 1.8.8.3
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -24,7 +24,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.8.8.2 - 2014-07-29
|
||||
* 4chan X - Version 1.8.8.3 - 2014-08-02
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -378,7 +378,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.8.8.2',
|
||||
VERSION: '1.8.8.3',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -7816,6 +7816,9 @@
|
||||
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
|
||||
return new Notice('error', 'Corrupt or unplayable video', 30);
|
||||
}
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
|
||||
if (!URL) {
|
||||
return;
|
||||
@ -7994,32 +7997,42 @@
|
||||
return true;
|
||||
},
|
||||
error: function(file, post, delay, cb) {
|
||||
var kill, timeoutID;
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return cb(null);
|
||||
var URL, redirect, src, timeoutID;
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (!(URL && (/^https:\/\//.test(URL) || location.protocol === 'http:'))) {
|
||||
URL = null;
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return ImageCommon.retry(post, cb);
|
||||
if ((post.isDead || post.file.isDead) && file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
return cb(URL);
|
||||
}
|
||||
if (delay != null) {
|
||||
timeoutID = setTimeout(ImageCommon.retry, delay, post, cb);
|
||||
timeoutID = setTimeout((function() {
|
||||
return cb(URL);
|
||||
}), delay);
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return;
|
||||
}
|
||||
kill = function(fileOnly) {
|
||||
clearTimeout(timeoutID);
|
||||
post.kill(fileOnly);
|
||||
return ImageCommon.retry(post, cb);
|
||||
redirect = function() {
|
||||
if (file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
if (delay != null) {
|
||||
clearTimeout(timeoutID);
|
||||
}
|
||||
return cb(URL);
|
||||
}
|
||||
};
|
||||
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||
onload: function() {
|
||||
var postObj, _i, _len, _ref;
|
||||
if (this.status === 404) {
|
||||
return kill();
|
||||
post.kill();
|
||||
}
|
||||
if (this.status !== 200) {
|
||||
return;
|
||||
return redirect();
|
||||
}
|
||||
_ref = this.response.posts;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -8029,28 +8042,17 @@
|
||||
}
|
||||
}
|
||||
if (postObj.no !== post.ID) {
|
||||
return kill();
|
||||
post.kill();
|
||||
return redirect();
|
||||
} else if (postObj.filedeleted) {
|
||||
return kill(true);
|
||||
post.kill(true);
|
||||
return redirect();
|
||||
} else {
|
||||
return URL = post.file.URL;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
retry: function(post, cb) {
|
||||
var URL, src;
|
||||
if (!(post.isDead || post.file.isDead)) {
|
||||
return cb(post.file.URL + '?' + Date.now());
|
||||
}
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
|
||||
return cb(URL);
|
||||
}
|
||||
return cb(null);
|
||||
},
|
||||
addControls: function(video) {
|
||||
var handler;
|
||||
handler = function() {
|
||||
@ -8387,20 +8389,23 @@
|
||||
post = Get.postFromNode(this);
|
||||
$.rm(this);
|
||||
delete post.file.fullImage;
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
ImageExpand.contract(post);
|
||||
if (!(post.file.isExpanding || post.file.isExpanded)) {
|
||||
return;
|
||||
}
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
if (this.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
@ -8464,6 +8469,9 @@
|
||||
post = Get.postFromNode(this);
|
||||
file = post.file;
|
||||
isVideo = file.isVideo;
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
if (el = file.fullImage) {
|
||||
el.id = 'ihover';
|
||||
TrashQueue.remove(el);
|
||||
@ -8472,7 +8480,6 @@
|
||||
className: 'full-image',
|
||||
id: 'ihover'
|
||||
});
|
||||
el.dataset.fullID = post.fullID;
|
||||
$.on(el, 'error', ImageHover.error);
|
||||
el.src = file.URL;
|
||||
$.after(file.thumb, el);
|
||||
@ -8498,7 +8505,6 @@
|
||||
},
|
||||
noRemove: true,
|
||||
cb: function() {
|
||||
$.off(el, 'error', ImageHover.error);
|
||||
if (isVideo) {
|
||||
el.pause();
|
||||
TrashQueue.add(el, post);
|
||||
@ -8509,20 +8515,26 @@
|
||||
},
|
||||
error: function() {
|
||||
var post;
|
||||
if (!doc.contains(this)) {
|
||||
post = Get.postFromNode(this);
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
post = g.posts[this.dataset.fullID];
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
if (this.id === 'ihover') {
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL + (_this.src === URL ? '?' + Date.now() : '');
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
} else {
|
||||
$.off(this, 'error', ImageHover.error);
|
||||
$.rm(this);
|
||||
return delete post.file.fullImage;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
};
|
||||
|
||||
@ -11201,7 +11213,7 @@
|
||||
_ref = $$("#board-list a:not(.catalog), #boardNavDesktopFoot a");
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
a = _ref[_i];
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) {
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan') || $.hasClass(a, 'external')) {
|
||||
continue;
|
||||
}
|
||||
a.href = generateURL(board);
|
||||
@ -12582,7 +12594,7 @@
|
||||
Settings.dialog = dialog = $.el('div', {
|
||||
id: 'fourchanx-settings',
|
||||
className: 'dialog',
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
});
|
||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||
@ -13424,7 +13436,7 @@
|
||||
}
|
||||
if (previousversion) {
|
||||
el = $.el('span', {
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.2</a>.'
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.3</a>.'
|
||||
});
|
||||
new Notice('info', el, 15);
|
||||
} else {
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.8.2
|
||||
// @version 1.8.8.3
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -23,7 +23,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.8.8.2 - 2014-07-29
|
||||
* 4chan X - Version 1.8.8.3 - 2014-08-02
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -377,7 +377,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.8.8.2',
|
||||
VERSION: '1.8.8.3',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -7815,6 +7815,9 @@
|
||||
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
|
||||
return new Notice('error', 'Corrupt or unplayable video', 30);
|
||||
}
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
|
||||
if (!URL) {
|
||||
return;
|
||||
@ -7993,32 +7996,42 @@
|
||||
return true;
|
||||
},
|
||||
error: function(file, post, delay, cb) {
|
||||
var kill, timeoutID;
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return cb(null);
|
||||
var URL, redirect, src, timeoutID;
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (!(URL && (/^https:\/\//.test(URL) || location.protocol === 'http:'))) {
|
||||
URL = null;
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return ImageCommon.retry(post, cb);
|
||||
if ((post.isDead || post.file.isDead) && file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
return cb(URL);
|
||||
}
|
||||
if (delay != null) {
|
||||
timeoutID = setTimeout(ImageCommon.retry, delay, post, cb);
|
||||
timeoutID = setTimeout((function() {
|
||||
return cb(URL);
|
||||
}), delay);
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return;
|
||||
}
|
||||
kill = function(fileOnly) {
|
||||
clearTimeout(timeoutID);
|
||||
post.kill(fileOnly);
|
||||
return ImageCommon.retry(post, cb);
|
||||
redirect = function() {
|
||||
if (file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
if (delay != null) {
|
||||
clearTimeout(timeoutID);
|
||||
}
|
||||
return cb(URL);
|
||||
}
|
||||
};
|
||||
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||
onload: function() {
|
||||
var postObj, _i, _len, _ref;
|
||||
if (this.status === 404) {
|
||||
return kill();
|
||||
post.kill();
|
||||
}
|
||||
if (this.status !== 200) {
|
||||
return;
|
||||
return redirect();
|
||||
}
|
||||
_ref = this.response.posts;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -8028,28 +8041,17 @@
|
||||
}
|
||||
}
|
||||
if (postObj.no !== post.ID) {
|
||||
return kill();
|
||||
post.kill();
|
||||
return redirect();
|
||||
} else if (postObj.filedeleted) {
|
||||
return kill(true);
|
||||
post.kill(true);
|
||||
return redirect();
|
||||
} else {
|
||||
return URL = post.file.URL;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
retry: function(post, cb) {
|
||||
var URL, src;
|
||||
if (!(post.isDead || post.file.isDead)) {
|
||||
return cb(post.file.URL + '?' + Date.now());
|
||||
}
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
|
||||
return cb(URL);
|
||||
}
|
||||
return cb(null);
|
||||
},
|
||||
addControls: function(video) {
|
||||
var handler;
|
||||
handler = function() {
|
||||
@ -8386,20 +8388,23 @@
|
||||
post = Get.postFromNode(this);
|
||||
$.rm(this);
|
||||
delete post.file.fullImage;
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
ImageExpand.contract(post);
|
||||
if (!(post.file.isExpanding || post.file.isExpanded)) {
|
||||
return;
|
||||
}
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
if (this.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
@ -8463,6 +8468,9 @@
|
||||
post = Get.postFromNode(this);
|
||||
file = post.file;
|
||||
isVideo = file.isVideo;
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
if (el = file.fullImage) {
|
||||
el.id = 'ihover';
|
||||
TrashQueue.remove(el);
|
||||
@ -8471,7 +8479,6 @@
|
||||
className: 'full-image',
|
||||
id: 'ihover'
|
||||
});
|
||||
el.dataset.fullID = post.fullID;
|
||||
$.on(el, 'error', ImageHover.error);
|
||||
el.src = file.URL;
|
||||
$.after(file.thumb, el);
|
||||
@ -8497,7 +8504,6 @@
|
||||
},
|
||||
noRemove: true,
|
||||
cb: function() {
|
||||
$.off(el, 'error', ImageHover.error);
|
||||
if (isVideo) {
|
||||
el.pause();
|
||||
TrashQueue.add(el, post);
|
||||
@ -8508,20 +8514,26 @@
|
||||
},
|
||||
error: function() {
|
||||
var post;
|
||||
if (!doc.contains(this)) {
|
||||
post = Get.postFromNode(this);
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
post = g.posts[this.dataset.fullID];
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
if (this.id === 'ihover') {
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL + (_this.src === URL ? '?' + Date.now() : '');
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
} else {
|
||||
$.off(this, 'error', ImageHover.error);
|
||||
$.rm(this);
|
||||
return delete post.file.fullImage;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
};
|
||||
|
||||
@ -11200,7 +11212,7 @@
|
||||
_ref = $$("#board-list a:not(.catalog), #boardNavDesktopFoot a");
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
a = _ref[_i];
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) {
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan') || $.hasClass(a, 'external')) {
|
||||
continue;
|
||||
}
|
||||
a.href = generateURL(board);
|
||||
@ -12581,7 +12593,7 @@
|
||||
Settings.dialog = dialog = $.el('div', {
|
||||
id: 'fourchanx-settings',
|
||||
className: 'dialog',
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
});
|
||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||
@ -13423,7 +13435,7 @@
|
||||
}
|
||||
if (previousversion) {
|
||||
el = $.el('span', {
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.2</a>.'
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.3</a>.'
|
||||
});
|
||||
new Notice('info', el, 15);
|
||||
} else {
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.8.2
|
||||
// @version 1.8.8.3
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.8.2
|
||||
// @version 1.8.8.3
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -24,7 +24,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.8.8.2 - 2014-07-29
|
||||
* 4chan X - Version 1.8.8.3 - 2014-08-02
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -378,7 +378,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.8.8.2',
|
||||
VERSION: '1.8.8.3',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -7816,6 +7816,9 @@
|
||||
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
|
||||
return new Notice('error', 'Corrupt or unplayable video', 30);
|
||||
}
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
|
||||
if (!URL) {
|
||||
return;
|
||||
@ -7994,32 +7997,42 @@
|
||||
return true;
|
||||
},
|
||||
error: function(file, post, delay, cb) {
|
||||
var kill, timeoutID;
|
||||
if (file.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return cb(null);
|
||||
var URL, redirect, src, timeoutID;
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (!(URL && (/^https:\/\//.test(URL) || location.protocol === 'http:'))) {
|
||||
URL = null;
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return ImageCommon.retry(post, cb);
|
||||
if ((post.isDead || post.file.isDead) && file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
return cb(URL);
|
||||
}
|
||||
if (delay != null) {
|
||||
timeoutID = setTimeout(ImageCommon.retry, delay, post, cb);
|
||||
timeoutID = setTimeout((function() {
|
||||
return cb(URL);
|
||||
}), delay);
|
||||
}
|
||||
if (post.isDead || post.file.isDead) {
|
||||
return;
|
||||
}
|
||||
kill = function(fileOnly) {
|
||||
clearTimeout(timeoutID);
|
||||
post.kill(fileOnly);
|
||||
return ImageCommon.retry(post, cb);
|
||||
redirect = function() {
|
||||
if (file.src.split('/')[2] === 'i.4cdn.org') {
|
||||
if (delay != null) {
|
||||
clearTimeout(timeoutID);
|
||||
}
|
||||
return cb(URL);
|
||||
}
|
||||
};
|
||||
return $.ajax("//a.4cdn.org/" + post.board + "/thread/" + post.thread + ".json", {
|
||||
onload: function() {
|
||||
var postObj, _i, _len, _ref;
|
||||
if (this.status === 404) {
|
||||
return kill();
|
||||
post.kill();
|
||||
}
|
||||
if (this.status !== 200) {
|
||||
return;
|
||||
return redirect();
|
||||
}
|
||||
_ref = this.response.posts;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -8029,28 +8042,17 @@
|
||||
}
|
||||
}
|
||||
if (postObj.no !== post.ID) {
|
||||
return kill();
|
||||
post.kill();
|
||||
return redirect();
|
||||
} else if (postObj.filedeleted) {
|
||||
return kill(true);
|
||||
post.kill(true);
|
||||
return redirect();
|
||||
} else {
|
||||
return URL = post.file.URL;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
retry: function(post, cb) {
|
||||
var URL, src;
|
||||
if (!(post.isDead || post.file.isDead)) {
|
||||
return cb(post.file.URL + '?' + Date.now());
|
||||
}
|
||||
src = post.file.URL.split('/');
|
||||
URL = Redirect.to('file', {
|
||||
boardID: post.board.ID,
|
||||
filename: src[src.length - 1]
|
||||
});
|
||||
if (URL && (/^https:\/\//.test(URL) || location.protocol === 'http:')) {
|
||||
return cb(URL);
|
||||
}
|
||||
return cb(null);
|
||||
},
|
||||
addControls: function(video) {
|
||||
var handler;
|
||||
handler = function() {
|
||||
@ -8387,20 +8389,23 @@
|
||||
post = Get.postFromNode(this);
|
||||
$.rm(this);
|
||||
delete post.file.fullImage;
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
ImageExpand.contract(post);
|
||||
if (!(post.file.isExpanding || post.file.isExpanded)) {
|
||||
return;
|
||||
}
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
if (this.src.split('/')[2] !== 'i.4cdn.org') {
|
||||
return ImageExpand.contract(post);
|
||||
}
|
||||
return ImageCommon.error(this, post, 10 * $.SECOND, function(URL) {
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
ImageExpand.contract(post);
|
||||
if (URL) {
|
||||
return ImageExpand.expand(post, URL);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
menu: {
|
||||
init: function() {
|
||||
@ -8464,6 +8469,9 @@
|
||||
post = Get.postFromNode(this);
|
||||
file = post.file;
|
||||
isVideo = file.isVideo;
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
if (el = file.fullImage) {
|
||||
el.id = 'ihover';
|
||||
TrashQueue.remove(el);
|
||||
@ -8472,7 +8480,6 @@
|
||||
className: 'full-image',
|
||||
id: 'ihover'
|
||||
});
|
||||
el.dataset.fullID = post.fullID;
|
||||
$.on(el, 'error', ImageHover.error);
|
||||
el.src = file.URL;
|
||||
$.after(file.thumb, el);
|
||||
@ -8498,7 +8505,6 @@
|
||||
},
|
||||
noRemove: true,
|
||||
cb: function() {
|
||||
$.off(el, 'error', ImageHover.error);
|
||||
if (isVideo) {
|
||||
el.pause();
|
||||
TrashQueue.add(el, post);
|
||||
@ -8509,20 +8515,26 @@
|
||||
},
|
||||
error: function() {
|
||||
var post;
|
||||
if (!doc.contains(this)) {
|
||||
post = Get.postFromNode(this);
|
||||
if (post.file.isExpanding || post.file.isExpanded) {
|
||||
return;
|
||||
}
|
||||
post = g.posts[this.dataset.fullID];
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
if (this.id === 'ihover') {
|
||||
if (ImageCommon.decodeError(this, post)) {
|
||||
return;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL + (_this.src === URL ? '?' + Date.now() : '');
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
} else {
|
||||
$.off(this, 'error', ImageHover.error);
|
||||
$.rm(this);
|
||||
return delete post.file.fullImage;
|
||||
}
|
||||
return ImageCommon.error(this, post, 3 * $.SECOND, (function(_this) {
|
||||
return function(URL) {
|
||||
if (URL) {
|
||||
return _this.src = URL;
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
}
|
||||
};
|
||||
|
||||
@ -11201,7 +11213,7 @@
|
||||
_ref = $$("#board-list a:not(.catalog), #boardNavDesktopFoot a");
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
a = _ref[_i];
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan')) {
|
||||
if (((_ref1 = a.hostname) !== 'boards.4chan.org' && _ref1 !== 'catalog.neet.tv' && _ref1 !== '4index.gropes.us') || !(board = a.pathname.split('/')[1]) || (board === 'f' || board === 'status' || board === '4chan') || $.hasClass(a, 'external')) {
|
||||
continue;
|
||||
}
|
||||
a.href = generateURL(board);
|
||||
@ -12582,7 +12594,7 @@
|
||||
Settings.dialog = dialog = $.el('div', {
|
||||
id: 'fourchanx-settings',
|
||||
className: 'dialog',
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||
});
|
||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||
@ -13424,7 +13436,7 @@
|
||||
}
|
||||
if (previousversion) {
|
||||
el = $.el('span', {
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.2</a>.'
|
||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.8.3</a>.'
|
||||
});
|
||||
new Notice('info', el, 15);
|
||||
} else {
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.8.2' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.8.3' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.8.2' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.8.3' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "4chan-X",
|
||||
"version": "1.8.8.2",
|
||||
"version": "1.8.8.3",
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user