Release 4chan X v1.13.8.0.
This commit is contained in:
parent
2aed2b51ea
commit
f97d3fc171
11
CHANGELOG.md
11
CHANGELOG.md
@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
-Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0).
|
-Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0).
|
||||||
|
|
||||||
|
### v1.13.8
|
||||||
|
|
||||||
|
**v1.13.8.0** *(2017-02-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.8.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.8.0/builds/4chan-X-noupdate.crx)]
|
||||||
|
- Based on v1.13.7.2.
|
||||||
|
- Retry posting on connection errors using the same captcha.
|
||||||
|
- Don't autohide QR while uploading is in progress. (#222) Also, `Auto Hide QR` is now a suboption of `Persistent QR`.
|
||||||
|
- Various minor captcha-related bugfixes and improvements.
|
||||||
|
- Sauce link optimizations and bugfixes.
|
||||||
|
- Move You checkbox down in menu (beneath Archive). #1277
|
||||||
|
- Turn `Download Link` off by default in new installs. #1222
|
||||||
|
|
||||||
### v1.13.7
|
### v1.13.7
|
||||||
|
|
||||||
**v1.13.7.2** *(2017-02-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.7.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.7.2/builds/4chan-X-noupdate.crx)]
|
**v1.13.7.2** *(2017-02-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.7.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.13.7.2/builds/4chan-X-noupdate.crx)]
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.7.2
|
// @version 1.13.8.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.13.7.2
|
// @version 1.13.8.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -151,7 +151,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.7.2',
|
VERSION: '1.13.8.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -278,7 +278,7 @@ Config = (function() {
|
|||||||
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
||||||
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
||||||
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
||||||
'Download Link': [true, 'Add a download with original filename link to the menu.', 1]
|
'Download Link': [false, 'Add a download with original filename link to the menu.', 1]
|
||||||
},
|
},
|
||||||
'Monitoring': {
|
'Monitoring': {
|
||||||
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
||||||
@ -304,7 +304,7 @@ Config = (function() {
|
|||||||
'Posting and Captchas': {
|
'Posting and Captchas': {
|
||||||
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
||||||
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
||||||
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1],
|
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 2],
|
||||||
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
||||||
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
||||||
@ -6317,7 +6317,8 @@ Post = (function() {
|
|||||||
isImage: /(jpg|png|gif)$/i.test(link.href),
|
isImage: /(jpg|png|gif)$/i.test(link.href),
|
||||||
isVideo: /webm$/i.test(link.href),
|
isVideo: /webm$/i.test(link.href),
|
||||||
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
||||||
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0
|
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0,
|
||||||
|
MD5: fileText.dataset.md5
|
||||||
};
|
};
|
||||||
size = +this.file.size.match(/[\d.]+/)[0];
|
size = +this.file.size.match(/[\d.]+/)[0];
|
||||||
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
||||||
@ -8441,7 +8442,7 @@ Build = (function() {
|
|||||||
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
||||||
}
|
}
|
||||||
fileBlock = {
|
fileBlock = {
|
||||||
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\" data-md5=\"" + E(file.MD5) + "\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Whole Post */
|
/* Whole Post */
|
||||||
@ -11274,6 +11275,9 @@ Settings = (function() {
|
|||||||
if (compareString < '00001.00013.00007.00002') {
|
if (compareString < '00001.00013.00007.00002') {
|
||||||
setD('Require OP Quote Link', true);
|
setD('Require OP Quote Link', true);
|
||||||
}
|
}
|
||||||
|
if (compareString < '00001.00013.00008.00000') {
|
||||||
|
setD('Download Link', true);
|
||||||
|
}
|
||||||
return changes;
|
return changes;
|
||||||
},
|
},
|
||||||
loadSettings: function(data, cb) {
|
loadSettings: function(data, cb) {
|
||||||
@ -13808,7 +13812,7 @@ Sauce = (function() {
|
|||||||
return parts;
|
return parts;
|
||||||
},
|
},
|
||||||
createSauceLink: function(link, post) {
|
createSauceLink: function(link, post) {
|
||||||
var a, ext, j, key, len, matches, parts, ref, ref1, skip;
|
var a, ext, j, key, len, matches, missing, parts, ref, ref1;
|
||||||
ext = post.file.url.match(/[^.]*$/)[0];
|
ext = post.file.url.match(/[^.]*$/)[0];
|
||||||
parts = {};
|
parts = {};
|
||||||
$.extend(parts, link);
|
$.extend(parts, link);
|
||||||
@ -13821,7 +13825,7 @@ Sauce = (function() {
|
|||||||
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
skip = false;
|
missing = [];
|
||||||
ref1 = ['url', 'text'];
|
ref1 = ['url', 'text'];
|
||||||
for (j = 0, len = ref1.length; j < len; j++) {
|
for (j = 0, len = ref1.length; j < len; j++) {
|
||||||
key = ref1[j];
|
key = ref1[j];
|
||||||
@ -13835,7 +13839,7 @@ Sauce = (function() {
|
|||||||
} else {
|
} else {
|
||||||
type = Sauce.formatters[parameter](post, ext);
|
type = Sauce.formatters[parameter](post, ext);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
skip = true;
|
missing.push(parameter);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13848,7 +13852,14 @@ Sauce = (function() {
|
|||||||
return type;
|
return type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (skip) {
|
if (post.board.ID === 'f' && missing.length && !missing.filter(function(x) {
|
||||||
|
return !/^.?MD5$/.test(x);
|
||||||
|
}).length) {
|
||||||
|
a = Sauce.link.cloneNode(false);
|
||||||
|
a.dataset.skip = '1';
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
if (missing.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
a = Sauce.link.cloneNode(false);
|
a = Sauce.link.cloneNode(false);
|
||||||
@ -13869,14 +13880,15 @@ Sauce = (function() {
|
|||||||
ref = Sauce.links;
|
ref = Sauce.links;
|
||||||
for (j = 0, len = ref.length; j < len; j++) {
|
for (j = 0, len = ref.length; j < len; j++) {
|
||||||
link = ref[j];
|
link = ref[j];
|
||||||
if (!(node = Sauce.createSauceLink(link, this))) {
|
if ((node = Sauce.createSauceLink(link, this))) {
|
||||||
node = Sauce.link.cloneNode(false);
|
nodes.push($.tn(' '), node);
|
||||||
skipped.push([link, node]);
|
if (node.dataset.skip) {
|
||||||
|
skipped.push([link, node]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nodes.push($.tn(' '), node);
|
|
||||||
}
|
}
|
||||||
$.add(this.file.text, nodes);
|
$.add(this.file.text, nodes);
|
||||||
if (this.board.ID === 'f') {
|
if (skipped.length) {
|
||||||
observer = new MutationObserver((function(_this) {
|
observer = new MutationObserver((function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
var k, len1, node2, ref1;
|
var k, len1, node2, ref1;
|
||||||
@ -15010,7 +15022,7 @@ ArchiveLink = (function() {
|
|||||||
});
|
});
|
||||||
entry = {
|
entry = {
|
||||||
el: div,
|
el: div,
|
||||||
order: 90,
|
order: 60,
|
||||||
open: function(arg) {
|
open: function(arg) {
|
||||||
var ID, board, thread;
|
var ID, board, thread;
|
||||||
ID = arg.ID, thread = arg.thread, board = arg.board;
|
ID = arg.ID, thread = arg.thread, board = arg.board;
|
||||||
@ -19694,12 +19706,98 @@ Unread = (function() {
|
|||||||
|
|
||||||
Captcha = {};
|
Captcha = {};
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
Captcha.cache = {
|
||||||
|
init: function() {
|
||||||
|
$.get('captchas', [], (function(_this) {
|
||||||
|
return function(arg) {
|
||||||
|
var captchas;
|
||||||
|
captchas = arg.captchas;
|
||||||
|
_this.sync(captchas);
|
||||||
|
return _this.clear();
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
|
return $.sync('captchas', this.sync.bind(this));
|
||||||
|
},
|
||||||
|
captchas: [],
|
||||||
|
getCount: function() {
|
||||||
|
return this.captchas.length;
|
||||||
|
},
|
||||||
|
needed: function() {
|
||||||
|
var captchaCount, postsCount;
|
||||||
|
captchaCount = this.captchas.length;
|
||||||
|
if (QR.req) {
|
||||||
|
captchaCount++;
|
||||||
|
}
|
||||||
|
postsCount = QR.posts.length;
|
||||||
|
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
||||||
|
postsCount = 0;
|
||||||
|
}
|
||||||
|
return captchaCount < postsCount;
|
||||||
|
},
|
||||||
|
sync: function(captchas) {
|
||||||
|
if (captchas == null) {
|
||||||
|
captchas = [];
|
||||||
|
}
|
||||||
|
this.captchas = captchas;
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
getOne: function() {
|
||||||
|
var captcha;
|
||||||
|
this.clear();
|
||||||
|
if ((captcha = this.captchas.shift())) {
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
this.count();
|
||||||
|
return captcha;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save: function(captcha) {
|
||||||
|
$.forceSync('captchas');
|
||||||
|
this.captchas.push(captcha);
|
||||||
|
this.captchas.sort(function(a, b) {
|
||||||
|
return a.timeout - b.timeout;
|
||||||
|
});
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
clear: function() {
|
||||||
|
var captcha, i, j, len, now, ref;
|
||||||
|
$.forceSync('captchas');
|
||||||
|
if (this.captchas.length) {
|
||||||
|
now = Date.now();
|
||||||
|
ref = this.captchas;
|
||||||
|
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
||||||
|
captcha = ref[i];
|
||||||
|
if (captcha.timeout > now) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i) {
|
||||||
|
this.captchas = this.captchas.slice(i);
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
count: function() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
if (this.captchas.length) {
|
||||||
|
this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
||||||
|
}
|
||||||
|
return $.event('CaptchaCount', this.captchas.length);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
Captcha.fixes = {
|
Captcha.fixes = {
|
||||||
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
||||||
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
||||||
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
||||||
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n /* XXX Fixes for Google\'s broken CSS */\n display: inline-block;\n margin-left: 0;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
||||||
init: function() {
|
init: function() {
|
||||||
switch (location.pathname.split('/')[3]) {
|
switch (location.pathname.split('/')[3]) {
|
||||||
case 'anchor':
|
case 'anchor':
|
||||||
@ -20024,17 +20122,16 @@ Captcha = {};
|
|||||||
$.on(input, 'blur', QR.focusout);
|
$.on(input, 'blur', QR.focusout);
|
||||||
$.on(input, 'focus', QR.focusin);
|
$.on(input, 'focus', QR.focusin);
|
||||||
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
||||||
|
$.on(input, 'input', function() {
|
||||||
|
if (!Captcha.cache.getCount()) {
|
||||||
|
return QR.posts[0].preventAutoPost();
|
||||||
|
}
|
||||||
|
});
|
||||||
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
||||||
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
||||||
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
QR.captcha.sync(captchas);
|
|
||||||
return QR.captcha.clear();
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync);
|
|
||||||
this.replace();
|
this.replace();
|
||||||
this.beforeSetup();
|
this.beforeSetup();
|
||||||
if (Conf['Auto-load captcha']) {
|
if (Conf['Auto-load captcha']) {
|
||||||
@ -20129,22 +20226,9 @@ Captcha = {};
|
|||||||
this.count();
|
this.count();
|
||||||
return $.on(input, 'focus click', this.cb.focus);
|
return $.on(input, 'focus click', this.cb.focus);
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {},
|
||||||
var captchaCount, postsCount;
|
|
||||||
captchaCount = this.captchas.length;
|
|
||||||
if (QR.req) {
|
|
||||||
captchaCount++;
|
|
||||||
}
|
|
||||||
postsCount = QR.posts.length;
|
|
||||||
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
postsCount = 0;
|
|
||||||
}
|
|
||||||
return captchaCount < postsCount;
|
|
||||||
},
|
|
||||||
onNewPost: function() {},
|
|
||||||
onPostChange: function() {},
|
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (force || this.needed()))) {
|
if (!(this.isEnabled && (force || Captcha.cache.needed()))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.create();
|
this.create();
|
||||||
@ -20200,19 +20284,9 @@ Captcha = {};
|
|||||||
return this.beforeSetup();
|
return this.beforeSetup();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
QR.captcha.captchas = captchas;
|
|
||||||
return QR.captcha.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha, challenge, response, timeout;
|
var captcha, challenge, response, timeout;
|
||||||
this.clear();
|
if ((captcha = Captcha.cache.getOne())) {
|
||||||
if (captcha = this.captchas.shift()) {
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return captcha;
|
return captcha;
|
||||||
} else {
|
} else {
|
||||||
challenge = this.nodes.img.alt;
|
challenge = this.nodes.img.alt;
|
||||||
@ -20235,39 +20309,13 @@ Captcha = {};
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.nodes.input.value = '';
|
this.nodes.input.value = '';
|
||||||
this.captchas.push({
|
Captcha.cache.save({
|
||||||
challenge: this.nodes.img.alt,
|
challenge: this.nodes.img.alt,
|
||||||
response: response,
|
response: response,
|
||||||
timeout: this.timeout
|
timeout: this.timeout
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
this.count();
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
this.setup(false, true);
|
return this.setup(false, true);
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
},
|
||||||
load: function() {
|
load: function() {
|
||||||
var challenge, challenge_image;
|
var challenge, challenge_image;
|
||||||
@ -20285,12 +20333,11 @@ Captcha = {};
|
|||||||
challenge = this.nodes.challenge.firstChild.value;
|
challenge = this.nodes.challenge.firstChild.value;
|
||||||
this.nodes.img.alt = challenge;
|
this.nodes.img.alt = challenge;
|
||||||
this.nodes.img.src = challenge_image.src;
|
this.nodes.img.src = challenge_image.src;
|
||||||
this.nodes.input.value = '';
|
return this.nodes.input.value = '';
|
||||||
return this.clear();
|
|
||||||
},
|
},
|
||||||
count: function() {
|
count: function() {
|
||||||
var count, placeholder;
|
var count, placeholder;
|
||||||
count = this.captchas ? this.captchas.length : 0;
|
count = Captcha.cache.getCount();
|
||||||
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
||||||
placeholder += (function() {
|
placeholder += (function() {
|
||||||
switch (count) {
|
switch (count) {
|
||||||
@ -20308,11 +20355,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
this.nodes.input.placeholder = placeholder;
|
this.nodes.input.placeholder = placeholder;
|
||||||
this.nodes.input.alt = count;
|
return this.nodes.input.alt = count;
|
||||||
clearTimeout(this.timer);
|
|
||||||
if (count) {
|
|
||||||
return this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function(focus) {
|
reload: function(focus) {
|
||||||
$.global(function() {
|
$.global(function() {
|
||||||
@ -20357,13 +20400,8 @@ Captcha = {};
|
|||||||
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
||||||
$.addClass(QR.nodes.el, 'noscript-captcha');
|
$.addClass(QR.nodes.el, 'noscript-captcha');
|
||||||
}
|
}
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
return QR.captcha.sync(captchas);
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync.bind(this));
|
|
||||||
root = $.el('div', {
|
root = $.el('div', {
|
||||||
className: 'captcha-root'
|
className: 'captcha-root'
|
||||||
});
|
});
|
||||||
@ -20398,7 +20436,7 @@ Captcha = {};
|
|||||||
})(this));
|
})(this));
|
||||||
},
|
},
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
prevNeeded: 0,
|
||||||
noscriptURL: function() {
|
noscriptURL: function() {
|
||||||
var lang, url;
|
var lang, url;
|
||||||
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
||||||
@ -20407,28 +20445,17 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {
|
||||||
var captchaCount;
|
return $.queueTask((function(_this) {
|
||||||
captchaCount = this.captchas.length;
|
return function() {
|
||||||
if (QR.req) {
|
var needed;
|
||||||
captchaCount++;
|
needed = Captcha.cache.needed();
|
||||||
}
|
if (needed && !_this.prevNeeded) {
|
||||||
this.postsCount = QR.posts.length;
|
_this.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status);
|
||||||
if (this.postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
}
|
||||||
this.postsCount = 0;
|
return _this.prevNeeded = needed;
|
||||||
}
|
};
|
||||||
return captchaCount < this.postsCount;
|
})(this));
|
||||||
},
|
|
||||||
onNewPost: function() {
|
|
||||||
return this.setup();
|
|
||||||
},
|
|
||||||
onPostChange: function() {
|
|
||||||
if (this.postsCount === 0) {
|
|
||||||
this.setup();
|
|
||||||
}
|
|
||||||
if (QR.posts.length === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
return this.postsCount = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
if (this.nodes.container && !this.timeouts.destroy) {
|
if (this.nodes.container && !this.timeouts.destroy) {
|
||||||
@ -20438,7 +20465,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (this.needed() || force))) {
|
if (!(this.isEnabled && (Captcha.cache.needed() || force))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (focus) {
|
if (focus) {
|
||||||
@ -20544,11 +20571,6 @@ Captcha = {};
|
|||||||
if (d.activeElement === this.nodes.counter) {
|
if (d.activeElement === this.nodes.counter) {
|
||||||
iframe.focus();
|
iframe.focus();
|
||||||
}
|
}
|
||||||
$.global(function() {
|
|
||||||
var f;
|
|
||||||
f = document.querySelector('#qr iframe');
|
|
||||||
return f.focus = f.blur = function() {};
|
|
||||||
});
|
|
||||||
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
||||||
return $.on(iframe.parentNode, 'scroll', function() {
|
return $.on(iframe.parentNode, 'scroll', function() {
|
||||||
return this.scrollTop = 0;
|
return this.scrollTop = 0;
|
||||||
@ -20588,39 +20610,17 @@ Captcha = {};
|
|||||||
$.rm(node);
|
$.rm(node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
this.captchas = captchas;
|
|
||||||
this.clear();
|
|
||||||
return this.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha;
|
return Captcha.cache.getOne();
|
||||||
this.clear();
|
|
||||||
if ((captcha = this.captchas.shift())) {
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
return captcha;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
save: function(pasted, token) {
|
save: function(pasted, token) {
|
||||||
var base, focus, ref;
|
var base, focus, ref;
|
||||||
$.forceSync('captchas');
|
Captcha.cache.save({
|
||||||
this.captchas.push({
|
|
||||||
response: token || $('textarea', this.nodes.container).value,
|
response: token || $('textarea', this.nodes.container).value,
|
||||||
timeout: Date.now() + this.lifetime
|
timeout: Date.now() + this.lifetime
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
||||||
if (this.needed()) {
|
if (Captcha.cache.needed()) {
|
||||||
if (focus) {
|
if (focus) {
|
||||||
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
||||||
this.nodes.counter.focus();
|
this.nodes.counter.focus();
|
||||||
@ -20645,34 +20645,11 @@ Captcha = {};
|
|||||||
return QR.submit();
|
return QR.submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return this.setup(d.activeElement === QR.nodes.status);
|
|
||||||
},
|
|
||||||
count: function() {
|
count: function() {
|
||||||
this.nodes.counter.textContent = "Captchas: " + this.captchas.length;
|
var count;
|
||||||
clearTimeout(this.timeouts.clear);
|
count = Captcha.cache.getCount();
|
||||||
if (this.captchas.length) {
|
this.nodes.counter.textContent = "Captchas: " + count;
|
||||||
return this.timeouts.clear = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
return this.moreNeeded();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function() {
|
reload: function() {
|
||||||
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
||||||
@ -20932,7 +20909,7 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
QR.nodes.el.hidden = true;
|
QR.nodes.el.hidden = true;
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
$.addClass(QR.shortcut, 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
@ -20961,7 +20938,7 @@ QR = (function() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
hide: function() {
|
hide: function() {
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.addClass(QR.nodes.el, 'autohide');
|
$.addClass(QR.nodes.el, 'autohide');
|
||||||
return QR.nodes.autohide.checked = true;
|
return QR.nodes.autohide.checked = true;
|
||||||
},
|
},
|
||||||
@ -20976,6 +20953,11 @@ QR = (function() {
|
|||||||
return QR.unhide();
|
return QR.unhide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
blur: function() {
|
||||||
|
if (QR.nodes.el.contains(d.activeElement)) {
|
||||||
|
return d.activeElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleSJIS: function(e) {
|
toggleSJIS: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
||||||
@ -21050,6 +21032,11 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
connectionError: function() {
|
||||||
|
return $.el('span', {
|
||||||
|
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
||||||
|
});
|
||||||
|
},
|
||||||
notifications: [],
|
notifications: [],
|
||||||
cleanNotifications: function() {
|
cleanNotifications: function() {
|
||||||
var j, len, notification, ref;
|
var j, len, notification, ref;
|
||||||
@ -21476,7 +21463,7 @@ QR = (function() {
|
|||||||
return $.event('QRDialogCreation', null, dialog);
|
return $.event('QRDialogCreation', null, dialog);
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var captcha, cb, err, extra, filetag, formData, options, post, ref, thread, threadID;
|
var captcha, err, extra, filetag, formData, options, post, ref, thread, threadID, wasAuto;
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
@ -21487,6 +21474,9 @@ QR = (function() {
|
|||||||
$.forceSync('cooldowns');
|
$.forceSync('cooldowns');
|
||||||
if (QR.cooldown.seconds) {
|
if (QR.cooldown.seconds) {
|
||||||
QR.cooldown.auto = !QR.cooldown.auto;
|
QR.cooldown.auto = !QR.cooldown.auto;
|
||||||
|
if (QR.cooldown.auto) {
|
||||||
|
QR.captcha.setup(true);
|
||||||
|
}
|
||||||
QR.status();
|
QR.status();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -21528,13 +21518,8 @@ QR = (function() {
|
|||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wasAuto = QR.cooldown.auto;
|
||||||
QR.cooldown.auto = QR.posts.length > 1;
|
QR.cooldown.auto = QR.posts.length > 1;
|
||||||
if (Conf['Auto Hide QR'] && !QR.cooldown.auto) {
|
|
||||||
QR.hide();
|
|
||||||
}
|
|
||||||
if (!QR.cooldown.auto && $.x('ancestor::div[@id="qr"]', d.activeElement)) {
|
|
||||||
d.activeElement.blur();
|
|
||||||
}
|
|
||||||
post.lock();
|
post.lock();
|
||||||
formData = {
|
formData = {
|
||||||
resto: threadID,
|
resto: threadID,
|
||||||
@ -21554,12 +21539,15 @@ QR = (function() {
|
|||||||
onload: QR.response,
|
onload: QR.response,
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
post.unlock();
|
post.unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = true;
|
||||||
|
QR.cooldown.addDelay(post, 2);
|
||||||
QR.status();
|
QR.status();
|
||||||
return QR.error($.el('span', {
|
return QR.error(QR.connectionError());
|
||||||
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
extra = {
|
extra = {
|
||||||
@ -21578,70 +21566,50 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
cb = function(response) {
|
if (captcha != null) {
|
||||||
if (response != null) {
|
QR.currentCaptcha = captcha;
|
||||||
if (response.challenge != null) {
|
if (captcha.challenge != null) {
|
||||||
extra.form.append('recaptcha_challenge_field', response.challenge);
|
extra.form.append('recaptcha_challenge_field', captcha.challenge);
|
||||||
extra.form.append('recaptcha_response_field', response.response);
|
extra.form.append('recaptcha_response_field', captcha.response);
|
||||||
} else {
|
} else {
|
||||||
extra.form.append('g-recaptcha-response', response.response);
|
extra.form.append('g-recaptcha-response', captcha.response);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
|
||||||
return QR.req.progress = '...';
|
|
||||||
};
|
|
||||||
if (typeof captcha === 'function') {
|
|
||||||
QR.req = {
|
|
||||||
progress: '...',
|
|
||||||
abort: function() {
|
|
||||||
return cb = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
captcha(function(response) {
|
|
||||||
if (response) {
|
|
||||||
return typeof cb === "function" ? cb(response) : void 0;
|
|
||||||
} else {
|
|
||||||
delete QR.req;
|
|
||||||
post.unlock();
|
|
||||||
QR.cooldown.auto = !!QR.captcha.captchas.length;
|
|
||||||
return QR.status();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
cb(captcha);
|
|
||||||
}
|
}
|
||||||
return QR.status();
|
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
||||||
|
QR.req.progress = '...';
|
||||||
|
QR.status();
|
||||||
|
if (!wasAuto) {
|
||||||
|
return QR.captcha.setup(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
var URL, _, connErr, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
post.unlock();
|
post.unlock();
|
||||||
resDoc = req.response;
|
resDoc = req.response;
|
||||||
if (ban = $('.banType', resDoc)) {
|
if ((err = resDoc.getElementById('errmsg'))) {
|
||||||
err = $.el('span', ban.textContent.toLowerCase() === 'banned' ? {
|
|
||||||
innerHTML: "You are banned on " + ($(".board", resDoc)).innerHTML + "! ;_;<br>Click <a href=\"//www.4chan.org/banned\" target=\"_blank\">here</a> to see the reason."
|
|
||||||
} : {
|
|
||||||
innerHTML: "You were issued a warning on " + ($(".board", resDoc)).innerHTML + " as " + ($(".nameBlock", resDoc)).innerHTML + ".<br>Reason: " + ($(".reason", resDoc)).innerHTML
|
|
||||||
});
|
|
||||||
} else if (err = resDoc.getElementById('errmsg')) {
|
|
||||||
if ((ref = $('a', err)) != null) {
|
if ((ref = $('a', err)) != null) {
|
||||||
ref.target = '_blank';
|
ref.target = '_blank';
|
||||||
}
|
}
|
||||||
} else if (resDoc.title !== 'Post successful!') {
|
} else if ((connErr = resDoc.title !== 'Post successful!')) {
|
||||||
err = 'Connection error with sys.4chan.org.';
|
err = QR.connectionError();
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
} else if (req.status !== 200) {
|
} else if (req.status !== 200) {
|
||||||
err = "Error " + req.statusText + " (" + req.status + ")";
|
err = "Error " + req.statusText + " (" + req.status + ")";
|
||||||
}
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
if (err) {
|
if (err) {
|
||||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
if (/captcha|verification/i.test(err.textContent) || connErr) {
|
||||||
if (/mistyped/i.test(err.textContent)) {
|
if (/mistyped/i.test(err.textContent)) {
|
||||||
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
||||||
} else if (/expired/i.test(err.textContent)) {
|
} else if (/expired/i.test(err.textContent)) {
|
||||||
err = 'This CAPTCHA is no longer valid because it has expired.';
|
err = 'This CAPTCHA is no longer valid because it has expired.';
|
||||||
}
|
}
|
||||||
QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
|
QR.cooldown.auto = QR.captcha.isEnabled || connErr;
|
||||||
QR.cooldown.addDelay(post, 2);
|
QR.cooldown.addDelay(post, 2);
|
||||||
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
||||||
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
||||||
@ -21655,9 +21623,6 @@ QR = (function() {
|
|||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
}
|
}
|
||||||
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
||||||
if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
|
|
||||||
QR.cooldown.auto = false;
|
|
||||||
}
|
|
||||||
QR.status();
|
QR.status();
|
||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
@ -21689,11 +21654,17 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
if (!(Conf['Persistent QR'] || postsCount)) {
|
if (postsCount) {
|
||||||
QR.close();
|
|
||||||
} else {
|
|
||||||
post.rm();
|
post.rm();
|
||||||
QR.captcha.setup(d.activeElement === QR.nodes.status);
|
} else if (Conf['Persistent QR']) {
|
||||||
|
post.rm();
|
||||||
|
if (Conf['Auto Hide QR']) {
|
||||||
|
QR.hide();
|
||||||
|
} else {
|
||||||
|
QR.blur();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QR.close();
|
||||||
}
|
}
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
if (Conf['Posting Success Notifications']) {
|
if (Conf['Posting Success Notifications']) {
|
||||||
@ -21738,6 +21709,10 @@ QR = (function() {
|
|||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
QR.posts[0].unlock();
|
QR.posts[0].unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
||||||
@ -21985,7 +21960,7 @@ QR = (function() {
|
|||||||
$.on(a, 'click', this.editFile);
|
$.on(a, 'click', this.editFile);
|
||||||
return Menu.menu.addEntry({
|
return Menu.menu.addEntry({
|
||||||
el: a,
|
el: a,
|
||||||
order: 95,
|
order: 90,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
var file;
|
var file;
|
||||||
QR.oekaki.menu.post = post;
|
QR.oekaki.menu.post = post;
|
||||||
@ -22343,9 +22318,7 @@ QR = (function() {
|
|||||||
this.select();
|
this.select();
|
||||||
}
|
}
|
||||||
this.unlock();
|
this.unlock();
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onNewPost();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_Class.prototype.rm = function() {
|
_Class.prototype.rm = function() {
|
||||||
@ -22494,9 +22467,7 @@ QR = (function() {
|
|||||||
QR.characterCount();
|
QR.characterCount();
|
||||||
}
|
}
|
||||||
this.nodes.span.textContent = this.com;
|
this.nodes.span.textContent = this.com;
|
||||||
return $.queueTask(function() {
|
return QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_Class.rmErrored = function(e) {
|
_Class.rmErrored = function(e) {
|
||||||
@ -22583,9 +22554,7 @@ QR = (function() {
|
|||||||
this.filesize = $.bytesToString(this.file.size);
|
this.filesize = $.bytesToString(this.file.size);
|
||||||
this.checkSize();
|
this.checkSize();
|
||||||
$.addClass(this.nodes.el, 'has-file');
|
$.addClass(this.nodes.el, 'has-file');
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
URL.revokeObjectURL(this.URL);
|
URL.revokeObjectURL(this.URL);
|
||||||
this.saveFilename();
|
this.saveFilename();
|
||||||
if (this === QR.selected) {
|
if (this === QR.selected) {
|
||||||
@ -23598,7 +23567,7 @@ QuoteYou = (function() {
|
|||||||
$.on(input, 'change', QuoteYou.menu.toggle);
|
$.on(input, 'change', QuoteYou.menu.toggle);
|
||||||
return (ref = Menu.menu) != null ? ref.addEntry({
|
return (ref = Menu.menu) != null ? ref.addEntry({
|
||||||
el: label,
|
el: label,
|
||||||
order: 12,
|
order: 80,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
QuoteYou.menu.post = post.origin || post;
|
QuoteYou.menu.post = post.origin || post;
|
||||||
input.checked = QuoteYou.isYou(post);
|
input.checked = QuoteYou.isYou(post);
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.7.2
|
// @version 1.13.8.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -151,7 +151,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.7.2',
|
VERSION: '1.13.8.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -278,7 +278,7 @@ Config = (function() {
|
|||||||
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
||||||
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
||||||
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
||||||
'Download Link': [true, 'Add a download with original filename link to the menu.', 1]
|
'Download Link': [false, 'Add a download with original filename link to the menu.', 1]
|
||||||
},
|
},
|
||||||
'Monitoring': {
|
'Monitoring': {
|
||||||
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
||||||
@ -304,7 +304,7 @@ Config = (function() {
|
|||||||
'Posting and Captchas': {
|
'Posting and Captchas': {
|
||||||
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
||||||
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
||||||
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1],
|
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 2],
|
||||||
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
||||||
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
||||||
@ -6317,7 +6317,8 @@ Post = (function() {
|
|||||||
isImage: /(jpg|png|gif)$/i.test(link.href),
|
isImage: /(jpg|png|gif)$/i.test(link.href),
|
||||||
isVideo: /webm$/i.test(link.href),
|
isVideo: /webm$/i.test(link.href),
|
||||||
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
||||||
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0
|
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0,
|
||||||
|
MD5: fileText.dataset.md5
|
||||||
};
|
};
|
||||||
size = +this.file.size.match(/[\d.]+/)[0];
|
size = +this.file.size.match(/[\d.]+/)[0];
|
||||||
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
||||||
@ -8441,7 +8442,7 @@ Build = (function() {
|
|||||||
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
||||||
}
|
}
|
||||||
fileBlock = {
|
fileBlock = {
|
||||||
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\" data-md5=\"" + E(file.MD5) + "\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Whole Post */
|
/* Whole Post */
|
||||||
@ -11274,6 +11275,9 @@ Settings = (function() {
|
|||||||
if (compareString < '00001.00013.00007.00002') {
|
if (compareString < '00001.00013.00007.00002') {
|
||||||
setD('Require OP Quote Link', true);
|
setD('Require OP Quote Link', true);
|
||||||
}
|
}
|
||||||
|
if (compareString < '00001.00013.00008.00000') {
|
||||||
|
setD('Download Link', true);
|
||||||
|
}
|
||||||
return changes;
|
return changes;
|
||||||
},
|
},
|
||||||
loadSettings: function(data, cb) {
|
loadSettings: function(data, cb) {
|
||||||
@ -13808,7 +13812,7 @@ Sauce = (function() {
|
|||||||
return parts;
|
return parts;
|
||||||
},
|
},
|
||||||
createSauceLink: function(link, post) {
|
createSauceLink: function(link, post) {
|
||||||
var a, ext, j, key, len, matches, parts, ref, ref1, skip;
|
var a, ext, j, key, len, matches, missing, parts, ref, ref1;
|
||||||
ext = post.file.url.match(/[^.]*$/)[0];
|
ext = post.file.url.match(/[^.]*$/)[0];
|
||||||
parts = {};
|
parts = {};
|
||||||
$.extend(parts, link);
|
$.extend(parts, link);
|
||||||
@ -13821,7 +13825,7 @@ Sauce = (function() {
|
|||||||
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
skip = false;
|
missing = [];
|
||||||
ref1 = ['url', 'text'];
|
ref1 = ['url', 'text'];
|
||||||
for (j = 0, len = ref1.length; j < len; j++) {
|
for (j = 0, len = ref1.length; j < len; j++) {
|
||||||
key = ref1[j];
|
key = ref1[j];
|
||||||
@ -13835,7 +13839,7 @@ Sauce = (function() {
|
|||||||
} else {
|
} else {
|
||||||
type = Sauce.formatters[parameter](post, ext);
|
type = Sauce.formatters[parameter](post, ext);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
skip = true;
|
missing.push(parameter);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13848,7 +13852,14 @@ Sauce = (function() {
|
|||||||
return type;
|
return type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (skip) {
|
if (post.board.ID === 'f' && missing.length && !missing.filter(function(x) {
|
||||||
|
return !/^.?MD5$/.test(x);
|
||||||
|
}).length) {
|
||||||
|
a = Sauce.link.cloneNode(false);
|
||||||
|
a.dataset.skip = '1';
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
if (missing.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
a = Sauce.link.cloneNode(false);
|
a = Sauce.link.cloneNode(false);
|
||||||
@ -13869,14 +13880,15 @@ Sauce = (function() {
|
|||||||
ref = Sauce.links;
|
ref = Sauce.links;
|
||||||
for (j = 0, len = ref.length; j < len; j++) {
|
for (j = 0, len = ref.length; j < len; j++) {
|
||||||
link = ref[j];
|
link = ref[j];
|
||||||
if (!(node = Sauce.createSauceLink(link, this))) {
|
if ((node = Sauce.createSauceLink(link, this))) {
|
||||||
node = Sauce.link.cloneNode(false);
|
nodes.push($.tn(' '), node);
|
||||||
skipped.push([link, node]);
|
if (node.dataset.skip) {
|
||||||
|
skipped.push([link, node]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nodes.push($.tn(' '), node);
|
|
||||||
}
|
}
|
||||||
$.add(this.file.text, nodes);
|
$.add(this.file.text, nodes);
|
||||||
if (this.board.ID === 'f') {
|
if (skipped.length) {
|
||||||
observer = new MutationObserver((function(_this) {
|
observer = new MutationObserver((function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
var k, len1, node2, ref1;
|
var k, len1, node2, ref1;
|
||||||
@ -15010,7 +15022,7 @@ ArchiveLink = (function() {
|
|||||||
});
|
});
|
||||||
entry = {
|
entry = {
|
||||||
el: div,
|
el: div,
|
||||||
order: 90,
|
order: 60,
|
||||||
open: function(arg) {
|
open: function(arg) {
|
||||||
var ID, board, thread;
|
var ID, board, thread;
|
||||||
ID = arg.ID, thread = arg.thread, board = arg.board;
|
ID = arg.ID, thread = arg.thread, board = arg.board;
|
||||||
@ -19694,12 +19706,98 @@ Unread = (function() {
|
|||||||
|
|
||||||
Captcha = {};
|
Captcha = {};
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
Captcha.cache = {
|
||||||
|
init: function() {
|
||||||
|
$.get('captchas', [], (function(_this) {
|
||||||
|
return function(arg) {
|
||||||
|
var captchas;
|
||||||
|
captchas = arg.captchas;
|
||||||
|
_this.sync(captchas);
|
||||||
|
return _this.clear();
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
|
return $.sync('captchas', this.sync.bind(this));
|
||||||
|
},
|
||||||
|
captchas: [],
|
||||||
|
getCount: function() {
|
||||||
|
return this.captchas.length;
|
||||||
|
},
|
||||||
|
needed: function() {
|
||||||
|
var captchaCount, postsCount;
|
||||||
|
captchaCount = this.captchas.length;
|
||||||
|
if (QR.req) {
|
||||||
|
captchaCount++;
|
||||||
|
}
|
||||||
|
postsCount = QR.posts.length;
|
||||||
|
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
||||||
|
postsCount = 0;
|
||||||
|
}
|
||||||
|
return captchaCount < postsCount;
|
||||||
|
},
|
||||||
|
sync: function(captchas) {
|
||||||
|
if (captchas == null) {
|
||||||
|
captchas = [];
|
||||||
|
}
|
||||||
|
this.captchas = captchas;
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
getOne: function() {
|
||||||
|
var captcha;
|
||||||
|
this.clear();
|
||||||
|
if ((captcha = this.captchas.shift())) {
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
this.count();
|
||||||
|
return captcha;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save: function(captcha) {
|
||||||
|
$.forceSync('captchas');
|
||||||
|
this.captchas.push(captcha);
|
||||||
|
this.captchas.sort(function(a, b) {
|
||||||
|
return a.timeout - b.timeout;
|
||||||
|
});
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
clear: function() {
|
||||||
|
var captcha, i, j, len, now, ref;
|
||||||
|
$.forceSync('captchas');
|
||||||
|
if (this.captchas.length) {
|
||||||
|
now = Date.now();
|
||||||
|
ref = this.captchas;
|
||||||
|
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
||||||
|
captcha = ref[i];
|
||||||
|
if (captcha.timeout > now) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i) {
|
||||||
|
this.captchas = this.captchas.slice(i);
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
count: function() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
if (this.captchas.length) {
|
||||||
|
this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
||||||
|
}
|
||||||
|
return $.event('CaptchaCount', this.captchas.length);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
Captcha.fixes = {
|
Captcha.fixes = {
|
||||||
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
||||||
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
||||||
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
||||||
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n /* XXX Fixes for Google\'s broken CSS */\n display: inline-block;\n margin-left: 0;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
||||||
init: function() {
|
init: function() {
|
||||||
switch (location.pathname.split('/')[3]) {
|
switch (location.pathname.split('/')[3]) {
|
||||||
case 'anchor':
|
case 'anchor':
|
||||||
@ -20024,17 +20122,16 @@ Captcha = {};
|
|||||||
$.on(input, 'blur', QR.focusout);
|
$.on(input, 'blur', QR.focusout);
|
||||||
$.on(input, 'focus', QR.focusin);
|
$.on(input, 'focus', QR.focusin);
|
||||||
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
||||||
|
$.on(input, 'input', function() {
|
||||||
|
if (!Captcha.cache.getCount()) {
|
||||||
|
return QR.posts[0].preventAutoPost();
|
||||||
|
}
|
||||||
|
});
|
||||||
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
||||||
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
||||||
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
QR.captcha.sync(captchas);
|
|
||||||
return QR.captcha.clear();
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync);
|
|
||||||
this.replace();
|
this.replace();
|
||||||
this.beforeSetup();
|
this.beforeSetup();
|
||||||
if (Conf['Auto-load captcha']) {
|
if (Conf['Auto-load captcha']) {
|
||||||
@ -20129,22 +20226,9 @@ Captcha = {};
|
|||||||
this.count();
|
this.count();
|
||||||
return $.on(input, 'focus click', this.cb.focus);
|
return $.on(input, 'focus click', this.cb.focus);
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {},
|
||||||
var captchaCount, postsCount;
|
|
||||||
captchaCount = this.captchas.length;
|
|
||||||
if (QR.req) {
|
|
||||||
captchaCount++;
|
|
||||||
}
|
|
||||||
postsCount = QR.posts.length;
|
|
||||||
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
postsCount = 0;
|
|
||||||
}
|
|
||||||
return captchaCount < postsCount;
|
|
||||||
},
|
|
||||||
onNewPost: function() {},
|
|
||||||
onPostChange: function() {},
|
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (force || this.needed()))) {
|
if (!(this.isEnabled && (force || Captcha.cache.needed()))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.create();
|
this.create();
|
||||||
@ -20200,19 +20284,9 @@ Captcha = {};
|
|||||||
return this.beforeSetup();
|
return this.beforeSetup();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
QR.captcha.captchas = captchas;
|
|
||||||
return QR.captcha.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha, challenge, response, timeout;
|
var captcha, challenge, response, timeout;
|
||||||
this.clear();
|
if ((captcha = Captcha.cache.getOne())) {
|
||||||
if (captcha = this.captchas.shift()) {
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return captcha;
|
return captcha;
|
||||||
} else {
|
} else {
|
||||||
challenge = this.nodes.img.alt;
|
challenge = this.nodes.img.alt;
|
||||||
@ -20235,39 +20309,13 @@ Captcha = {};
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.nodes.input.value = '';
|
this.nodes.input.value = '';
|
||||||
this.captchas.push({
|
Captcha.cache.save({
|
||||||
challenge: this.nodes.img.alt,
|
challenge: this.nodes.img.alt,
|
||||||
response: response,
|
response: response,
|
||||||
timeout: this.timeout
|
timeout: this.timeout
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
this.count();
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
this.setup(false, true);
|
return this.setup(false, true);
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
},
|
||||||
load: function() {
|
load: function() {
|
||||||
var challenge, challenge_image;
|
var challenge, challenge_image;
|
||||||
@ -20285,12 +20333,11 @@ Captcha = {};
|
|||||||
challenge = this.nodes.challenge.firstChild.value;
|
challenge = this.nodes.challenge.firstChild.value;
|
||||||
this.nodes.img.alt = challenge;
|
this.nodes.img.alt = challenge;
|
||||||
this.nodes.img.src = challenge_image.src;
|
this.nodes.img.src = challenge_image.src;
|
||||||
this.nodes.input.value = '';
|
return this.nodes.input.value = '';
|
||||||
return this.clear();
|
|
||||||
},
|
},
|
||||||
count: function() {
|
count: function() {
|
||||||
var count, placeholder;
|
var count, placeholder;
|
||||||
count = this.captchas ? this.captchas.length : 0;
|
count = Captcha.cache.getCount();
|
||||||
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
||||||
placeholder += (function() {
|
placeholder += (function() {
|
||||||
switch (count) {
|
switch (count) {
|
||||||
@ -20308,11 +20355,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
this.nodes.input.placeholder = placeholder;
|
this.nodes.input.placeholder = placeholder;
|
||||||
this.nodes.input.alt = count;
|
return this.nodes.input.alt = count;
|
||||||
clearTimeout(this.timer);
|
|
||||||
if (count) {
|
|
||||||
return this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function(focus) {
|
reload: function(focus) {
|
||||||
$.global(function() {
|
$.global(function() {
|
||||||
@ -20357,13 +20400,8 @@ Captcha = {};
|
|||||||
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
||||||
$.addClass(QR.nodes.el, 'noscript-captcha');
|
$.addClass(QR.nodes.el, 'noscript-captcha');
|
||||||
}
|
}
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
return QR.captcha.sync(captchas);
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync.bind(this));
|
|
||||||
root = $.el('div', {
|
root = $.el('div', {
|
||||||
className: 'captcha-root'
|
className: 'captcha-root'
|
||||||
});
|
});
|
||||||
@ -20398,7 +20436,7 @@ Captcha = {};
|
|||||||
})(this));
|
})(this));
|
||||||
},
|
},
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
prevNeeded: 0,
|
||||||
noscriptURL: function() {
|
noscriptURL: function() {
|
||||||
var lang, url;
|
var lang, url;
|
||||||
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
||||||
@ -20407,28 +20445,17 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {
|
||||||
var captchaCount;
|
return $.queueTask((function(_this) {
|
||||||
captchaCount = this.captchas.length;
|
return function() {
|
||||||
if (QR.req) {
|
var needed;
|
||||||
captchaCount++;
|
needed = Captcha.cache.needed();
|
||||||
}
|
if (needed && !_this.prevNeeded) {
|
||||||
this.postsCount = QR.posts.length;
|
_this.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status);
|
||||||
if (this.postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
}
|
||||||
this.postsCount = 0;
|
return _this.prevNeeded = needed;
|
||||||
}
|
};
|
||||||
return captchaCount < this.postsCount;
|
})(this));
|
||||||
},
|
|
||||||
onNewPost: function() {
|
|
||||||
return this.setup();
|
|
||||||
},
|
|
||||||
onPostChange: function() {
|
|
||||||
if (this.postsCount === 0) {
|
|
||||||
this.setup();
|
|
||||||
}
|
|
||||||
if (QR.posts.length === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
return this.postsCount = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
if (this.nodes.container && !this.timeouts.destroy) {
|
if (this.nodes.container && !this.timeouts.destroy) {
|
||||||
@ -20438,7 +20465,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (this.needed() || force))) {
|
if (!(this.isEnabled && (Captcha.cache.needed() || force))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (focus) {
|
if (focus) {
|
||||||
@ -20544,11 +20571,6 @@ Captcha = {};
|
|||||||
if (d.activeElement === this.nodes.counter) {
|
if (d.activeElement === this.nodes.counter) {
|
||||||
iframe.focus();
|
iframe.focus();
|
||||||
}
|
}
|
||||||
$.global(function() {
|
|
||||||
var f;
|
|
||||||
f = document.querySelector('#qr iframe');
|
|
||||||
return f.focus = f.blur = function() {};
|
|
||||||
});
|
|
||||||
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
||||||
return $.on(iframe.parentNode, 'scroll', function() {
|
return $.on(iframe.parentNode, 'scroll', function() {
|
||||||
return this.scrollTop = 0;
|
return this.scrollTop = 0;
|
||||||
@ -20588,39 +20610,17 @@ Captcha = {};
|
|||||||
$.rm(node);
|
$.rm(node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
this.captchas = captchas;
|
|
||||||
this.clear();
|
|
||||||
return this.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha;
|
return Captcha.cache.getOne();
|
||||||
this.clear();
|
|
||||||
if ((captcha = this.captchas.shift())) {
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
return captcha;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
save: function(pasted, token) {
|
save: function(pasted, token) {
|
||||||
var base, focus, ref;
|
var base, focus, ref;
|
||||||
$.forceSync('captchas');
|
Captcha.cache.save({
|
||||||
this.captchas.push({
|
|
||||||
response: token || $('textarea', this.nodes.container).value,
|
response: token || $('textarea', this.nodes.container).value,
|
||||||
timeout: Date.now() + this.lifetime
|
timeout: Date.now() + this.lifetime
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
||||||
if (this.needed()) {
|
if (Captcha.cache.needed()) {
|
||||||
if (focus) {
|
if (focus) {
|
||||||
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
||||||
this.nodes.counter.focus();
|
this.nodes.counter.focus();
|
||||||
@ -20645,34 +20645,11 @@ Captcha = {};
|
|||||||
return QR.submit();
|
return QR.submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return this.setup(d.activeElement === QR.nodes.status);
|
|
||||||
},
|
|
||||||
count: function() {
|
count: function() {
|
||||||
this.nodes.counter.textContent = "Captchas: " + this.captchas.length;
|
var count;
|
||||||
clearTimeout(this.timeouts.clear);
|
count = Captcha.cache.getCount();
|
||||||
if (this.captchas.length) {
|
this.nodes.counter.textContent = "Captchas: " + count;
|
||||||
return this.timeouts.clear = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
return this.moreNeeded();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function() {
|
reload: function() {
|
||||||
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
||||||
@ -20932,7 +20909,7 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
QR.nodes.el.hidden = true;
|
QR.nodes.el.hidden = true;
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
$.addClass(QR.shortcut, 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
@ -20961,7 +20938,7 @@ QR = (function() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
hide: function() {
|
hide: function() {
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.addClass(QR.nodes.el, 'autohide');
|
$.addClass(QR.nodes.el, 'autohide');
|
||||||
return QR.nodes.autohide.checked = true;
|
return QR.nodes.autohide.checked = true;
|
||||||
},
|
},
|
||||||
@ -20976,6 +20953,11 @@ QR = (function() {
|
|||||||
return QR.unhide();
|
return QR.unhide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
blur: function() {
|
||||||
|
if (QR.nodes.el.contains(d.activeElement)) {
|
||||||
|
return d.activeElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleSJIS: function(e) {
|
toggleSJIS: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
||||||
@ -21050,6 +21032,11 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
connectionError: function() {
|
||||||
|
return $.el('span', {
|
||||||
|
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
||||||
|
});
|
||||||
|
},
|
||||||
notifications: [],
|
notifications: [],
|
||||||
cleanNotifications: function() {
|
cleanNotifications: function() {
|
||||||
var j, len, notification, ref;
|
var j, len, notification, ref;
|
||||||
@ -21476,7 +21463,7 @@ QR = (function() {
|
|||||||
return $.event('QRDialogCreation', null, dialog);
|
return $.event('QRDialogCreation', null, dialog);
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var captcha, cb, err, extra, filetag, formData, options, post, ref, thread, threadID;
|
var captcha, err, extra, filetag, formData, options, post, ref, thread, threadID, wasAuto;
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
@ -21487,6 +21474,9 @@ QR = (function() {
|
|||||||
$.forceSync('cooldowns');
|
$.forceSync('cooldowns');
|
||||||
if (QR.cooldown.seconds) {
|
if (QR.cooldown.seconds) {
|
||||||
QR.cooldown.auto = !QR.cooldown.auto;
|
QR.cooldown.auto = !QR.cooldown.auto;
|
||||||
|
if (QR.cooldown.auto) {
|
||||||
|
QR.captcha.setup(true);
|
||||||
|
}
|
||||||
QR.status();
|
QR.status();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -21528,13 +21518,8 @@ QR = (function() {
|
|||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wasAuto = QR.cooldown.auto;
|
||||||
QR.cooldown.auto = QR.posts.length > 1;
|
QR.cooldown.auto = QR.posts.length > 1;
|
||||||
if (Conf['Auto Hide QR'] && !QR.cooldown.auto) {
|
|
||||||
QR.hide();
|
|
||||||
}
|
|
||||||
if (!QR.cooldown.auto && $.x('ancestor::div[@id="qr"]', d.activeElement)) {
|
|
||||||
d.activeElement.blur();
|
|
||||||
}
|
|
||||||
post.lock();
|
post.lock();
|
||||||
formData = {
|
formData = {
|
||||||
resto: threadID,
|
resto: threadID,
|
||||||
@ -21554,12 +21539,15 @@ QR = (function() {
|
|||||||
onload: QR.response,
|
onload: QR.response,
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
post.unlock();
|
post.unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = true;
|
||||||
|
QR.cooldown.addDelay(post, 2);
|
||||||
QR.status();
|
QR.status();
|
||||||
return QR.error($.el('span', {
|
return QR.error(QR.connectionError());
|
||||||
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
extra = {
|
extra = {
|
||||||
@ -21578,70 +21566,50 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
cb = function(response) {
|
if (captcha != null) {
|
||||||
if (response != null) {
|
QR.currentCaptcha = captcha;
|
||||||
if (response.challenge != null) {
|
if (captcha.challenge != null) {
|
||||||
extra.form.append('recaptcha_challenge_field', response.challenge);
|
extra.form.append('recaptcha_challenge_field', captcha.challenge);
|
||||||
extra.form.append('recaptcha_response_field', response.response);
|
extra.form.append('recaptcha_response_field', captcha.response);
|
||||||
} else {
|
} else {
|
||||||
extra.form.append('g-recaptcha-response', response.response);
|
extra.form.append('g-recaptcha-response', captcha.response);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
|
||||||
return QR.req.progress = '...';
|
|
||||||
};
|
|
||||||
if (typeof captcha === 'function') {
|
|
||||||
QR.req = {
|
|
||||||
progress: '...',
|
|
||||||
abort: function() {
|
|
||||||
return cb = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
captcha(function(response) {
|
|
||||||
if (response) {
|
|
||||||
return typeof cb === "function" ? cb(response) : void 0;
|
|
||||||
} else {
|
|
||||||
delete QR.req;
|
|
||||||
post.unlock();
|
|
||||||
QR.cooldown.auto = !!QR.captcha.captchas.length;
|
|
||||||
return QR.status();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
cb(captcha);
|
|
||||||
}
|
}
|
||||||
return QR.status();
|
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
||||||
|
QR.req.progress = '...';
|
||||||
|
QR.status();
|
||||||
|
if (!wasAuto) {
|
||||||
|
return QR.captcha.setup(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
var URL, _, connErr, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
post.unlock();
|
post.unlock();
|
||||||
resDoc = req.response;
|
resDoc = req.response;
|
||||||
if (ban = $('.banType', resDoc)) {
|
if ((err = resDoc.getElementById('errmsg'))) {
|
||||||
err = $.el('span', ban.textContent.toLowerCase() === 'banned' ? {
|
|
||||||
innerHTML: "You are banned on " + ($(".board", resDoc)).innerHTML + "! ;_;<br>Click <a href=\"//www.4chan.org/banned\" target=\"_blank\">here</a> to see the reason."
|
|
||||||
} : {
|
|
||||||
innerHTML: "You were issued a warning on " + ($(".board", resDoc)).innerHTML + " as " + ($(".nameBlock", resDoc)).innerHTML + ".<br>Reason: " + ($(".reason", resDoc)).innerHTML
|
|
||||||
});
|
|
||||||
} else if (err = resDoc.getElementById('errmsg')) {
|
|
||||||
if ((ref = $('a', err)) != null) {
|
if ((ref = $('a', err)) != null) {
|
||||||
ref.target = '_blank';
|
ref.target = '_blank';
|
||||||
}
|
}
|
||||||
} else if (resDoc.title !== 'Post successful!') {
|
} else if ((connErr = resDoc.title !== 'Post successful!')) {
|
||||||
err = 'Connection error with sys.4chan.org.';
|
err = QR.connectionError();
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
} else if (req.status !== 200) {
|
} else if (req.status !== 200) {
|
||||||
err = "Error " + req.statusText + " (" + req.status + ")";
|
err = "Error " + req.statusText + " (" + req.status + ")";
|
||||||
}
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
if (err) {
|
if (err) {
|
||||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
if (/captcha|verification/i.test(err.textContent) || connErr) {
|
||||||
if (/mistyped/i.test(err.textContent)) {
|
if (/mistyped/i.test(err.textContent)) {
|
||||||
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
||||||
} else if (/expired/i.test(err.textContent)) {
|
} else if (/expired/i.test(err.textContent)) {
|
||||||
err = 'This CAPTCHA is no longer valid because it has expired.';
|
err = 'This CAPTCHA is no longer valid because it has expired.';
|
||||||
}
|
}
|
||||||
QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
|
QR.cooldown.auto = QR.captcha.isEnabled || connErr;
|
||||||
QR.cooldown.addDelay(post, 2);
|
QR.cooldown.addDelay(post, 2);
|
||||||
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
||||||
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
||||||
@ -21655,9 +21623,6 @@ QR = (function() {
|
|||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
}
|
}
|
||||||
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
||||||
if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
|
|
||||||
QR.cooldown.auto = false;
|
|
||||||
}
|
|
||||||
QR.status();
|
QR.status();
|
||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
@ -21689,11 +21654,17 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
if (!(Conf['Persistent QR'] || postsCount)) {
|
if (postsCount) {
|
||||||
QR.close();
|
|
||||||
} else {
|
|
||||||
post.rm();
|
post.rm();
|
||||||
QR.captcha.setup(d.activeElement === QR.nodes.status);
|
} else if (Conf['Persistent QR']) {
|
||||||
|
post.rm();
|
||||||
|
if (Conf['Auto Hide QR']) {
|
||||||
|
QR.hide();
|
||||||
|
} else {
|
||||||
|
QR.blur();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QR.close();
|
||||||
}
|
}
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
if (Conf['Posting Success Notifications']) {
|
if (Conf['Posting Success Notifications']) {
|
||||||
@ -21738,6 +21709,10 @@ QR = (function() {
|
|||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
QR.posts[0].unlock();
|
QR.posts[0].unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
||||||
@ -21985,7 +21960,7 @@ QR = (function() {
|
|||||||
$.on(a, 'click', this.editFile);
|
$.on(a, 'click', this.editFile);
|
||||||
return Menu.menu.addEntry({
|
return Menu.menu.addEntry({
|
||||||
el: a,
|
el: a,
|
||||||
order: 95,
|
order: 90,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
var file;
|
var file;
|
||||||
QR.oekaki.menu.post = post;
|
QR.oekaki.menu.post = post;
|
||||||
@ -22343,9 +22318,7 @@ QR = (function() {
|
|||||||
this.select();
|
this.select();
|
||||||
}
|
}
|
||||||
this.unlock();
|
this.unlock();
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onNewPost();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_Class.prototype.rm = function() {
|
_Class.prototype.rm = function() {
|
||||||
@ -22494,9 +22467,7 @@ QR = (function() {
|
|||||||
QR.characterCount();
|
QR.characterCount();
|
||||||
}
|
}
|
||||||
this.nodes.span.textContent = this.com;
|
this.nodes.span.textContent = this.com;
|
||||||
return $.queueTask(function() {
|
return QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_Class.rmErrored = function(e) {
|
_Class.rmErrored = function(e) {
|
||||||
@ -22583,9 +22554,7 @@ QR = (function() {
|
|||||||
this.filesize = $.bytesToString(this.file.size);
|
this.filesize = $.bytesToString(this.file.size);
|
||||||
this.checkSize();
|
this.checkSize();
|
||||||
$.addClass(this.nodes.el, 'has-file');
|
$.addClass(this.nodes.el, 'has-file');
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
URL.revokeObjectURL(this.URL);
|
URL.revokeObjectURL(this.URL);
|
||||||
this.saveFilename();
|
this.saveFilename();
|
||||||
if (this === QR.selected) {
|
if (this === QR.selected) {
|
||||||
@ -23598,7 +23567,7 @@ QuoteYou = (function() {
|
|||||||
$.on(input, 'change', QuoteYou.menu.toggle);
|
$.on(input, 'change', QuoteYou.menu.toggle);
|
||||||
return (ref = Menu.menu) != null ? ref.addEntry({
|
return (ref = Menu.menu) != null ? ref.addEntry({
|
||||||
el: label,
|
el: label,
|
||||||
order: 12,
|
order: 80,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
QuoteYou.menu.post = post.origin || post;
|
QuoteYou.menu.post = post.origin || post;
|
||||||
input.checked = QuoteYou.isYou(post);
|
input.checked = QuoteYou.isYou(post);
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.7.2
|
// @version 1.13.8.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.13.7.2
|
// @version 1.13.8.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -151,7 +151,7 @@ docSet = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.13.7.2',
|
VERSION: '1.13.8.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -278,7 +278,7 @@ Config = (function() {
|
|||||||
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
'Delete Link': [true, 'Add post and image deletion links to the menu.', 1],
|
||||||
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
'Archive Link': [true, 'Add an archive link to the menu.', 1],
|
||||||
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
'Edit Link': [true, 'Add a link to edit the image in Tegaki, /i/\'s painting program. Requires Quick Reply.', 1],
|
||||||
'Download Link': [true, 'Add a download with original filename link to the menu.', 1]
|
'Download Link': [false, 'Add a download with original filename link to the menu.', 1]
|
||||||
},
|
},
|
||||||
'Monitoring': {
|
'Monitoring': {
|
||||||
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
'Thread Updater': [true, 'Fetch and insert new replies. Has more options in the header menu and the "Advanced" tab.'],
|
||||||
@ -304,7 +304,7 @@ Config = (function() {
|
|||||||
'Posting and Captchas': {
|
'Posting and Captchas': {
|
||||||
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'],
|
||||||
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1],
|
||||||
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1],
|
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 2],
|
||||||
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1],
|
||||||
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1],
|
||||||
@ -6317,7 +6317,8 @@ Post = (function() {
|
|||||||
isImage: /(jpg|png|gif)$/i.test(link.href),
|
isImage: /(jpg|png|gif)$/i.test(link.href),
|
||||||
isVideo: /webm$/i.test(link.href),
|
isVideo: /webm$/i.test(link.href),
|
||||||
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
dimensions: (ref1 = info[0].match(/\d+x\d+/)) != null ? ref1[0] : void 0,
|
||||||
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0
|
tag: (ref2 = info[0].match(/,[^,]*, ([a-z]+)\)/i)) != null ? ref2[1] : void 0,
|
||||||
|
MD5: fileText.dataset.md5
|
||||||
};
|
};
|
||||||
size = +this.file.size.match(/[\d.]+/)[0];
|
size = +this.file.size.match(/[\d.]+/)[0];
|
||||||
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
unit = ['B', 'KB', 'MB', 'GB'].indexOf(this.file.size.match(/\w+$/)[0]);
|
||||||
@ -8441,7 +8442,7 @@ Build = (function() {
|
|||||||
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
fileThumb = file.isSpoiler ? Build.spoilerThumb(boardID) : file.thumbURL.replace(protocol, '');
|
||||||
}
|
}
|
||||||
fileBlock = {
|
fileBlock = {
|
||||||
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
innerHTML: ((file) ? "<div class=\"file\" id=\"f" + E(ID) + "\">" + ((boardID === "f") ? "<div class=\"fileInfo\" data-md5=\"" + E(file.MD5) + "\"><span class=\"fileText\" id=\"fT" + E(ID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(fileURL) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E(file.size) + ", " + E(file.dimensions) + ((file.tag) ? ", " + E(file.tag) : "") + ")</span></div>" : "<div class=\"fileText\" id=\"fT" + E(ID) + "\"" + ((file.isSpoiler) ? " title=\"" + E(file.name) + "\"" : "") + ">File: <a" + ((file.name === shortFilename || file.isSpoiler) ? "" : " title=\"" + E(file.name) + "\"") + " href=\"" + E(fileURL) + "\" target=\"_blank\">" + ((file.isSpoiler) ? "Spoiler Image" : E(shortFilename)) + "</a> (" + E(file.size) + ", " + E(file.dimensions || "PDF") + ")</div><a class=\"fileThumb" + ((file.isSpoiler) ? " imgspoiler" : "") + "\" href=\"" + E(fileURL) + "\" target=\"_blank\"" + ((file.hasDownscale) ? " data-m" : "") + "><img src=\"" + E(fileThumb) + "\" alt=\"" + E(file.size) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.isSpoiler ? 100 : file.theight) + "px; width: " + E(file.isSpoiler ? 100 : file.twidth) + "px;\"></a>") + "</div>" : ((o.fileDeleted) ? "<div class=\"file\" id=\"f" + E(ID) + "\"><span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span></div>" : ""))
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Whole Post */
|
/* Whole Post */
|
||||||
@ -11274,6 +11275,9 @@ Settings = (function() {
|
|||||||
if (compareString < '00001.00013.00007.00002') {
|
if (compareString < '00001.00013.00007.00002') {
|
||||||
setD('Require OP Quote Link', true);
|
setD('Require OP Quote Link', true);
|
||||||
}
|
}
|
||||||
|
if (compareString < '00001.00013.00008.00000') {
|
||||||
|
setD('Download Link', true);
|
||||||
|
}
|
||||||
return changes;
|
return changes;
|
||||||
},
|
},
|
||||||
loadSettings: function(data, cb) {
|
loadSettings: function(data, cb) {
|
||||||
@ -13808,7 +13812,7 @@ Sauce = (function() {
|
|||||||
return parts;
|
return parts;
|
||||||
},
|
},
|
||||||
createSauceLink: function(link, post) {
|
createSauceLink: function(link, post) {
|
||||||
var a, ext, j, key, len, matches, parts, ref, ref1, skip;
|
var a, ext, j, key, len, matches, missing, parts, ref, ref1;
|
||||||
ext = post.file.url.match(/[^.]*$/)[0];
|
ext = post.file.url.match(/[^.]*$/)[0];
|
||||||
parts = {};
|
parts = {};
|
||||||
$.extend(parts, link);
|
$.extend(parts, link);
|
||||||
@ -13821,7 +13825,7 @@ Sauce = (function() {
|
|||||||
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
if (!(!parts['regexp'] || (matches = post.file.name.match(parts['regexp'])))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
skip = false;
|
missing = [];
|
||||||
ref1 = ['url', 'text'];
|
ref1 = ['url', 'text'];
|
||||||
for (j = 0, len = ref1.length; j < len; j++) {
|
for (j = 0, len = ref1.length; j < len; j++) {
|
||||||
key = ref1[j];
|
key = ref1[j];
|
||||||
@ -13835,7 +13839,7 @@ Sauce = (function() {
|
|||||||
} else {
|
} else {
|
||||||
type = Sauce.formatters[parameter](post, ext);
|
type = Sauce.formatters[parameter](post, ext);
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
skip = true;
|
missing.push(parameter);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13848,7 +13852,14 @@ Sauce = (function() {
|
|||||||
return type;
|
return type;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (skip) {
|
if (post.board.ID === 'f' && missing.length && !missing.filter(function(x) {
|
||||||
|
return !/^.?MD5$/.test(x);
|
||||||
|
}).length) {
|
||||||
|
a = Sauce.link.cloneNode(false);
|
||||||
|
a.dataset.skip = '1';
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
if (missing.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
a = Sauce.link.cloneNode(false);
|
a = Sauce.link.cloneNode(false);
|
||||||
@ -13869,14 +13880,15 @@ Sauce = (function() {
|
|||||||
ref = Sauce.links;
|
ref = Sauce.links;
|
||||||
for (j = 0, len = ref.length; j < len; j++) {
|
for (j = 0, len = ref.length; j < len; j++) {
|
||||||
link = ref[j];
|
link = ref[j];
|
||||||
if (!(node = Sauce.createSauceLink(link, this))) {
|
if ((node = Sauce.createSauceLink(link, this))) {
|
||||||
node = Sauce.link.cloneNode(false);
|
nodes.push($.tn(' '), node);
|
||||||
skipped.push([link, node]);
|
if (node.dataset.skip) {
|
||||||
|
skipped.push([link, node]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nodes.push($.tn(' '), node);
|
|
||||||
}
|
}
|
||||||
$.add(this.file.text, nodes);
|
$.add(this.file.text, nodes);
|
||||||
if (this.board.ID === 'f') {
|
if (skipped.length) {
|
||||||
observer = new MutationObserver((function(_this) {
|
observer = new MutationObserver((function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
var k, len1, node2, ref1;
|
var k, len1, node2, ref1;
|
||||||
@ -15010,7 +15022,7 @@ ArchiveLink = (function() {
|
|||||||
});
|
});
|
||||||
entry = {
|
entry = {
|
||||||
el: div,
|
el: div,
|
||||||
order: 90,
|
order: 60,
|
||||||
open: function(arg) {
|
open: function(arg) {
|
||||||
var ID, board, thread;
|
var ID, board, thread;
|
||||||
ID = arg.ID, thread = arg.thread, board = arg.board;
|
ID = arg.ID, thread = arg.thread, board = arg.board;
|
||||||
@ -19694,12 +19706,98 @@ Unread = (function() {
|
|||||||
|
|
||||||
Captcha = {};
|
Captcha = {};
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
Captcha.cache = {
|
||||||
|
init: function() {
|
||||||
|
$.get('captchas', [], (function(_this) {
|
||||||
|
return function(arg) {
|
||||||
|
var captchas;
|
||||||
|
captchas = arg.captchas;
|
||||||
|
_this.sync(captchas);
|
||||||
|
return _this.clear();
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
|
return $.sync('captchas', this.sync.bind(this));
|
||||||
|
},
|
||||||
|
captchas: [],
|
||||||
|
getCount: function() {
|
||||||
|
return this.captchas.length;
|
||||||
|
},
|
||||||
|
needed: function() {
|
||||||
|
var captchaCount, postsCount;
|
||||||
|
captchaCount = this.captchas.length;
|
||||||
|
if (QR.req) {
|
||||||
|
captchaCount++;
|
||||||
|
}
|
||||||
|
postsCount = QR.posts.length;
|
||||||
|
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
||||||
|
postsCount = 0;
|
||||||
|
}
|
||||||
|
return captchaCount < postsCount;
|
||||||
|
},
|
||||||
|
sync: function(captchas) {
|
||||||
|
if (captchas == null) {
|
||||||
|
captchas = [];
|
||||||
|
}
|
||||||
|
this.captchas = captchas;
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
getOne: function() {
|
||||||
|
var captcha;
|
||||||
|
this.clear();
|
||||||
|
if ((captcha = this.captchas.shift())) {
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
this.count();
|
||||||
|
return captcha;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
save: function(captcha) {
|
||||||
|
$.forceSync('captchas');
|
||||||
|
this.captchas.push(captcha);
|
||||||
|
this.captchas.sort(function(a, b) {
|
||||||
|
return a.timeout - b.timeout;
|
||||||
|
});
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
},
|
||||||
|
clear: function() {
|
||||||
|
var captcha, i, j, len, now, ref;
|
||||||
|
$.forceSync('captchas');
|
||||||
|
if (this.captchas.length) {
|
||||||
|
now = Date.now();
|
||||||
|
ref = this.captchas;
|
||||||
|
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
||||||
|
captcha = ref[i];
|
||||||
|
if (captcha.timeout > now) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i) {
|
||||||
|
this.captchas = this.captchas.slice(i);
|
||||||
|
$.set('captchas', this.captchas);
|
||||||
|
return this.count();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
count: function() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
if (this.captchas.length) {
|
||||||
|
this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
||||||
|
}
|
||||||
|
return $.event('CaptchaCount', this.captchas.length);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}).call(this);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
Captcha.fixes = {
|
Captcha.fixes = {
|
||||||
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
imageKeys: '789456123uiojklm'.split('').concat(['Comma', 'Period']),
|
||||||
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
imageKeys16: '7890uiopjkl'.split('').concat(['Semicolon', 'm', 'Comma', 'Period', 'Slash']),
|
||||||
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
css: '.rc-imageselect-target > div:focus, .rc-image-tile-target:focus {\n outline: 2px solid #4a90e2;\n}\n.rc-imageselect-target td:focus {\n box-shadow: inset 0 0 0 2px #4a90e2;\n outline: none;\n}\n.rc-button-default:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}',
|
||||||
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
cssNoscript: '.fbc-payload-imageselect {\n position: relative;\n /* XXX Fixes for Google\'s broken CSS */\n display: inline-block;\n margin-left: 0;\n}\n.fbc-payload-imageselect > label {\n position: absolute;\n display: block;\n height: 93.3px;\n width: 93.3px;\n}\nlabel[data-row="0"] {top: 0px;}\nlabel[data-row="1"] {top: 93.3px;}\nlabel[data-row="2"] {top: 186.6px;}\nlabel[data-col="0"] {left: 0px;}\nlabel[data-col="1"] {left: 93.3px;}\nlabel[data-col="2"] {left: 186.6px;}\n.fbc-payload-imageselect > input:focus + label {\n outline: 2px solid #4a90e2;\n}\n.fbc-button-verify input:focus {\n box-shadow: inset 0 0 0 2px #0063d6;\n}\nbody.focus .fbc {\n box-shadow: inset 0 0 0 2px #4a90e2;\n}',
|
||||||
init: function() {
|
init: function() {
|
||||||
switch (location.pathname.split('/')[3]) {
|
switch (location.pathname.split('/')[3]) {
|
||||||
case 'anchor':
|
case 'anchor':
|
||||||
@ -20024,17 +20122,16 @@ Captcha = {};
|
|||||||
$.on(input, 'blur', QR.focusout);
|
$.on(input, 'blur', QR.focusout);
|
||||||
$.on(input, 'focus', QR.focusin);
|
$.on(input, 'focus', QR.focusin);
|
||||||
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
$.on(input, 'keydown', QR.captcha.keydown.bind(QR.captcha));
|
||||||
|
$.on(input, 'input', function() {
|
||||||
|
if (!Captcha.cache.getCount()) {
|
||||||
|
return QR.posts[0].preventAutoPost();
|
||||||
|
}
|
||||||
|
});
|
||||||
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
$.on(this.nodes.img.parentNode, 'click', QR.captcha.reload.bind(QR.captcha));
|
||||||
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
$.addClass(QR.nodes.el, 'has-captcha', 'captcha-v1');
|
||||||
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
$.after(QR.nodes.com.parentNode, [imgContainer, input]);
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
QR.captcha.sync(captchas);
|
|
||||||
return QR.captcha.clear();
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync);
|
|
||||||
this.replace();
|
this.replace();
|
||||||
this.beforeSetup();
|
this.beforeSetup();
|
||||||
if (Conf['Auto-load captcha']) {
|
if (Conf['Auto-load captcha']) {
|
||||||
@ -20129,22 +20226,9 @@ Captcha = {};
|
|||||||
this.count();
|
this.count();
|
||||||
return $.on(input, 'focus click', this.cb.focus);
|
return $.on(input, 'focus click', this.cb.focus);
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {},
|
||||||
var captchaCount, postsCount;
|
|
||||||
captchaCount = this.captchas.length;
|
|
||||||
if (QR.req) {
|
|
||||||
captchaCount++;
|
|
||||||
}
|
|
||||||
postsCount = QR.posts.length;
|
|
||||||
if (postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
postsCount = 0;
|
|
||||||
}
|
|
||||||
return captchaCount < postsCount;
|
|
||||||
},
|
|
||||||
onNewPost: function() {},
|
|
||||||
onPostChange: function() {},
|
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (force || this.needed()))) {
|
if (!(this.isEnabled && (force || Captcha.cache.needed()))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.create();
|
this.create();
|
||||||
@ -20200,19 +20284,9 @@ Captcha = {};
|
|||||||
return this.beforeSetup();
|
return this.beforeSetup();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
QR.captcha.captchas = captchas;
|
|
||||||
return QR.captcha.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha, challenge, response, timeout;
|
var captcha, challenge, response, timeout;
|
||||||
this.clear();
|
if ((captcha = Captcha.cache.getOne())) {
|
||||||
if (captcha = this.captchas.shift()) {
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return captcha;
|
return captcha;
|
||||||
} else {
|
} else {
|
||||||
challenge = this.nodes.img.alt;
|
challenge = this.nodes.img.alt;
|
||||||
@ -20235,39 +20309,13 @@ Captcha = {};
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.nodes.input.value = '';
|
this.nodes.input.value = '';
|
||||||
this.captchas.push({
|
Captcha.cache.save({
|
||||||
challenge: this.nodes.img.alt,
|
challenge: this.nodes.img.alt,
|
||||||
response: response,
|
response: response,
|
||||||
timeout: this.timeout
|
timeout: this.timeout
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
this.count();
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
this.setup(false, true);
|
return this.setup(false, true);
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
return $.set('captchas', this.captchas);
|
|
||||||
},
|
},
|
||||||
load: function() {
|
load: function() {
|
||||||
var challenge, challenge_image;
|
var challenge, challenge_image;
|
||||||
@ -20285,12 +20333,11 @@ Captcha = {};
|
|||||||
challenge = this.nodes.challenge.firstChild.value;
|
challenge = this.nodes.challenge.firstChild.value;
|
||||||
this.nodes.img.alt = challenge;
|
this.nodes.img.alt = challenge;
|
||||||
this.nodes.img.src = challenge_image.src;
|
this.nodes.img.src = challenge_image.src;
|
||||||
this.nodes.input.value = '';
|
return this.nodes.input.value = '';
|
||||||
return this.clear();
|
|
||||||
},
|
},
|
||||||
count: function() {
|
count: function() {
|
||||||
var count, placeholder;
|
var count, placeholder;
|
||||||
count = this.captchas ? this.captchas.length : 0;
|
count = Captcha.cache.getCount();
|
||||||
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
placeholder = this.nodes.input.placeholder.replace(/\ \(.*\)$/, '');
|
||||||
placeholder += (function() {
|
placeholder += (function() {
|
||||||
switch (count) {
|
switch (count) {
|
||||||
@ -20308,11 +20355,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
this.nodes.input.placeholder = placeholder;
|
this.nodes.input.placeholder = placeholder;
|
||||||
this.nodes.input.alt = count;
|
return this.nodes.input.alt = count;
|
||||||
clearTimeout(this.timer);
|
|
||||||
if (count) {
|
|
||||||
return this.timer = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function(focus) {
|
reload: function(focus) {
|
||||||
$.global(function() {
|
$.global(function() {
|
||||||
@ -20357,13 +20400,8 @@ Captcha = {};
|
|||||||
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
if ((this.noscript = Conf['Force Noscript Captcha'] || !Main.jsEnabled)) {
|
||||||
$.addClass(QR.nodes.el, 'noscript-captcha');
|
$.addClass(QR.nodes.el, 'noscript-captcha');
|
||||||
}
|
}
|
||||||
this.captchas = [];
|
Captcha.cache.init();
|
||||||
$.get('captchas', [], function(arg) {
|
$.on(d, 'CaptchaCount', this.count.bind(this));
|
||||||
var captchas;
|
|
||||||
captchas = arg.captchas;
|
|
||||||
return QR.captcha.sync(captchas);
|
|
||||||
});
|
|
||||||
$.sync('captchas', this.sync.bind(this));
|
|
||||||
root = $.el('div', {
|
root = $.el('div', {
|
||||||
className: 'captcha-root'
|
className: 'captcha-root'
|
||||||
});
|
});
|
||||||
@ -20398,7 +20436,7 @@ Captcha = {};
|
|||||||
})(this));
|
})(this));
|
||||||
},
|
},
|
||||||
timeouts: {},
|
timeouts: {},
|
||||||
postsCount: 0,
|
prevNeeded: 0,
|
||||||
noscriptURL: function() {
|
noscriptURL: function() {
|
||||||
var lang, url;
|
var lang, url;
|
||||||
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
url = 'https://www.google.com/recaptcha/api/fallback?k=6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc';
|
||||||
@ -20407,28 +20445,17 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
needed: function() {
|
moreNeeded: function() {
|
||||||
var captchaCount;
|
return $.queueTask((function(_this) {
|
||||||
captchaCount = this.captchas.length;
|
return function() {
|
||||||
if (QR.req) {
|
var needed;
|
||||||
captchaCount++;
|
needed = Captcha.cache.needed();
|
||||||
}
|
if (needed && !_this.prevNeeded) {
|
||||||
this.postsCount = QR.posts.length;
|
_this.setup(QR.cooldown.auto && d.activeElement === QR.nodes.status);
|
||||||
if (this.postsCount === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
}
|
||||||
this.postsCount = 0;
|
return _this.prevNeeded = needed;
|
||||||
}
|
};
|
||||||
return captchaCount < this.postsCount;
|
})(this));
|
||||||
},
|
|
||||||
onNewPost: function() {
|
|
||||||
return this.setup();
|
|
||||||
},
|
|
||||||
onPostChange: function() {
|
|
||||||
if (this.postsCount === 0) {
|
|
||||||
this.setup();
|
|
||||||
}
|
|
||||||
if (QR.posts.length === 1 && !Conf['Auto-load captcha'] && !QR.posts[0].com && !QR.posts[0].file) {
|
|
||||||
return this.postsCount = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
if (this.nodes.container && !this.timeouts.destroy) {
|
if (this.nodes.container && !this.timeouts.destroy) {
|
||||||
@ -20438,7 +20465,7 @@ Captcha = {};
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup: function(focus, force) {
|
setup: function(focus, force) {
|
||||||
if (!(this.isEnabled && (this.needed() || force))) {
|
if (!(this.isEnabled && (Captcha.cache.needed() || force))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (focus) {
|
if (focus) {
|
||||||
@ -20544,11 +20571,6 @@ Captcha = {};
|
|||||||
if (d.activeElement === this.nodes.counter) {
|
if (d.activeElement === this.nodes.counter) {
|
||||||
iframe.focus();
|
iframe.focus();
|
||||||
}
|
}
|
||||||
$.global(function() {
|
|
||||||
var f;
|
|
||||||
f = document.querySelector('#qr iframe');
|
|
||||||
return f.focus = f.blur = function() {};
|
|
||||||
});
|
|
||||||
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
if (((ref = $.engine) === 'blink' || ref === 'edge') && (ref1 = iframe.parentNode, indexOf.call($$('#qr .captcha-container > div > div:first-of-type'), ref1) >= 0)) {
|
||||||
return $.on(iframe.parentNode, 'scroll', function() {
|
return $.on(iframe.parentNode, 'scroll', function() {
|
||||||
return this.scrollTop = 0;
|
return this.scrollTop = 0;
|
||||||
@ -20588,39 +20610,17 @@ Captcha = {};
|
|||||||
$.rm(node);
|
$.rm(node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
|
||||||
if (captchas == null) {
|
|
||||||
captchas = [];
|
|
||||||
}
|
|
||||||
this.captchas = captchas;
|
|
||||||
this.clear();
|
|
||||||
return this.count();
|
|
||||||
},
|
|
||||||
getOne: function() {
|
getOne: function() {
|
||||||
var captcha;
|
return Captcha.cache.getOne();
|
||||||
this.clear();
|
|
||||||
if ((captcha = this.captchas.shift())) {
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
return captcha;
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
save: function(pasted, token) {
|
save: function(pasted, token) {
|
||||||
var base, focus, ref;
|
var base, focus, ref;
|
||||||
$.forceSync('captchas');
|
Captcha.cache.save({
|
||||||
this.captchas.push({
|
|
||||||
response: token || $('textarea', this.nodes.container).value,
|
response: token || $('textarea', this.nodes.container).value,
|
||||||
timeout: Date.now() + this.lifetime
|
timeout: Date.now() + this.lifetime
|
||||||
});
|
});
|
||||||
this.captchas.sort(function(a, b) {
|
|
||||||
return a.timeout - b.timeout;
|
|
||||||
});
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
this.count();
|
|
||||||
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
focus = ((ref = d.activeElement) != null ? ref.nodeName : void 0) === 'IFRAME' && /https?:\/\/www\.google\.com\/recaptcha\//.test(d.activeElement.src);
|
||||||
if (this.needed()) {
|
if (Captcha.cache.needed()) {
|
||||||
if (focus) {
|
if (focus) {
|
||||||
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
if (QR.cooldown.auto || Conf['Post on Captcha Completion']) {
|
||||||
this.nodes.counter.focus();
|
this.nodes.counter.focus();
|
||||||
@ -20645,34 +20645,11 @@ Captcha = {};
|
|||||||
return QR.submit();
|
return QR.submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clear: function() {
|
|
||||||
var captcha, i, j, len, now, ref;
|
|
||||||
if (!this.captchas.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$.forceSync('captchas');
|
|
||||||
now = Date.now();
|
|
||||||
ref = this.captchas;
|
|
||||||
for (i = j = 0, len = ref.length; j < len; i = ++j) {
|
|
||||||
captcha = ref[i];
|
|
||||||
if (captcha.timeout > now) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!i) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.captchas = this.captchas.slice(i);
|
|
||||||
this.count();
|
|
||||||
$.set('captchas', this.captchas);
|
|
||||||
return this.setup(d.activeElement === QR.nodes.status);
|
|
||||||
},
|
|
||||||
count: function() {
|
count: function() {
|
||||||
this.nodes.counter.textContent = "Captchas: " + this.captchas.length;
|
var count;
|
||||||
clearTimeout(this.timeouts.clear);
|
count = Captcha.cache.getCount();
|
||||||
if (this.captchas.length) {
|
this.nodes.counter.textContent = "Captchas: " + count;
|
||||||
return this.timeouts.clear = setTimeout(this.clear.bind(this), this.captchas[0].timeout - Date.now());
|
return this.moreNeeded();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
reload: function() {
|
reload: function() {
|
||||||
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
if ($('iframe[src^="https://www.google.com/recaptcha/api/fallback?"]', this.nodes.container)) {
|
||||||
@ -20932,7 +20909,7 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
QR.nodes.el.hidden = true;
|
QR.nodes.el.hidden = true;
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
$.addClass(QR.shortcut, 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
@ -20961,7 +20938,7 @@ QR = (function() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
hide: function() {
|
hide: function() {
|
||||||
d.activeElement.blur();
|
QR.blur();
|
||||||
$.addClass(QR.nodes.el, 'autohide');
|
$.addClass(QR.nodes.el, 'autohide');
|
||||||
return QR.nodes.autohide.checked = true;
|
return QR.nodes.autohide.checked = true;
|
||||||
},
|
},
|
||||||
@ -20976,6 +20953,11 @@ QR = (function() {
|
|||||||
return QR.unhide();
|
return QR.unhide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
blur: function() {
|
||||||
|
if (QR.nodes.el.contains(d.activeElement)) {
|
||||||
|
return d.activeElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleSJIS: function(e) {
|
toggleSJIS: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
Conf['sjisPreview'] = !Conf['sjisPreview'];
|
||||||
@ -21050,6 +21032,11 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
connectionError: function() {
|
||||||
|
return $.el('span', {
|
||||||
|
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
||||||
|
});
|
||||||
|
},
|
||||||
notifications: [],
|
notifications: [],
|
||||||
cleanNotifications: function() {
|
cleanNotifications: function() {
|
||||||
var j, len, notification, ref;
|
var j, len, notification, ref;
|
||||||
@ -21476,7 +21463,7 @@ QR = (function() {
|
|||||||
return $.event('QRDialogCreation', null, dialog);
|
return $.event('QRDialogCreation', null, dialog);
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var captcha, cb, err, extra, filetag, formData, options, post, ref, thread, threadID;
|
var captcha, err, extra, filetag, formData, options, post, ref, thread, threadID, wasAuto;
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
@ -21487,6 +21474,9 @@ QR = (function() {
|
|||||||
$.forceSync('cooldowns');
|
$.forceSync('cooldowns');
|
||||||
if (QR.cooldown.seconds) {
|
if (QR.cooldown.seconds) {
|
||||||
QR.cooldown.auto = !QR.cooldown.auto;
|
QR.cooldown.auto = !QR.cooldown.auto;
|
||||||
|
if (QR.cooldown.auto) {
|
||||||
|
QR.captcha.setup(true);
|
||||||
|
}
|
||||||
QR.status();
|
QR.status();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -21528,13 +21518,8 @@ QR = (function() {
|
|||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wasAuto = QR.cooldown.auto;
|
||||||
QR.cooldown.auto = QR.posts.length > 1;
|
QR.cooldown.auto = QR.posts.length > 1;
|
||||||
if (Conf['Auto Hide QR'] && !QR.cooldown.auto) {
|
|
||||||
QR.hide();
|
|
||||||
}
|
|
||||||
if (!QR.cooldown.auto && $.x('ancestor::div[@id="qr"]', d.activeElement)) {
|
|
||||||
d.activeElement.blur();
|
|
||||||
}
|
|
||||||
post.lock();
|
post.lock();
|
||||||
formData = {
|
formData = {
|
||||||
resto: threadID,
|
resto: threadID,
|
||||||
@ -21554,12 +21539,15 @@ QR = (function() {
|
|||||||
onload: QR.response,
|
onload: QR.response,
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
post.unlock();
|
post.unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = true;
|
||||||
|
QR.cooldown.addDelay(post, 2);
|
||||||
QR.status();
|
QR.status();
|
||||||
return QR.error($.el('span', {
|
return QR.error(QR.connectionError());
|
||||||
innerHTML: "Connection error while posting. [<a href=\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions#connection-errors\" target=\"_blank\">More info</a>]"
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
extra = {
|
extra = {
|
||||||
@ -21578,70 +21566,50 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
cb = function(response) {
|
if (captcha != null) {
|
||||||
if (response != null) {
|
QR.currentCaptcha = captcha;
|
||||||
if (response.challenge != null) {
|
if (captcha.challenge != null) {
|
||||||
extra.form.append('recaptcha_challenge_field', response.challenge);
|
extra.form.append('recaptcha_challenge_field', captcha.challenge);
|
||||||
extra.form.append('recaptcha_response_field', response.response);
|
extra.form.append('recaptcha_response_field', captcha.response);
|
||||||
} else {
|
} else {
|
||||||
extra.form.append('g-recaptcha-response', response.response);
|
extra.form.append('g-recaptcha-response', captcha.response);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
|
||||||
return QR.req.progress = '...';
|
|
||||||
};
|
|
||||||
if (typeof captcha === 'function') {
|
|
||||||
QR.req = {
|
|
||||||
progress: '...',
|
|
||||||
abort: function() {
|
|
||||||
return cb = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
captcha(function(response) {
|
|
||||||
if (response) {
|
|
||||||
return typeof cb === "function" ? cb(response) : void 0;
|
|
||||||
} else {
|
|
||||||
delete QR.req;
|
|
||||||
post.unlock();
|
|
||||||
QR.cooldown.auto = !!QR.captcha.captchas.length;
|
|
||||||
return QR.status();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
cb(captcha);
|
|
||||||
}
|
}
|
||||||
return QR.status();
|
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
|
||||||
|
QR.req.progress = '...';
|
||||||
|
QR.status();
|
||||||
|
if (!wasAuto) {
|
||||||
|
return QR.captcha.setup(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
response: function() {
|
response: function() {
|
||||||
var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
var URL, _, connErr, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID;
|
||||||
req = QR.req;
|
req = QR.req;
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
post = QR.posts[0];
|
post = QR.posts[0];
|
||||||
post.unlock();
|
post.unlock();
|
||||||
resDoc = req.response;
|
resDoc = req.response;
|
||||||
if (ban = $('.banType', resDoc)) {
|
if ((err = resDoc.getElementById('errmsg'))) {
|
||||||
err = $.el('span', ban.textContent.toLowerCase() === 'banned' ? {
|
|
||||||
innerHTML: "You are banned on " + ($(".board", resDoc)).innerHTML + "! ;_;<br>Click <a href=\"//www.4chan.org/banned\" target=\"_blank\">here</a> to see the reason."
|
|
||||||
} : {
|
|
||||||
innerHTML: "You were issued a warning on " + ($(".board", resDoc)).innerHTML + " as " + ($(".nameBlock", resDoc)).innerHTML + ".<br>Reason: " + ($(".reason", resDoc)).innerHTML
|
|
||||||
});
|
|
||||||
} else if (err = resDoc.getElementById('errmsg')) {
|
|
||||||
if ((ref = $('a', err)) != null) {
|
if ((ref = $('a', err)) != null) {
|
||||||
ref.target = '_blank';
|
ref.target = '_blank';
|
||||||
}
|
}
|
||||||
} else if (resDoc.title !== 'Post successful!') {
|
} else if ((connErr = resDoc.title !== 'Post successful!')) {
|
||||||
err = 'Connection error with sys.4chan.org.';
|
err = QR.connectionError();
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
} else if (req.status !== 200) {
|
} else if (req.status !== 200) {
|
||||||
err = "Error " + req.statusText + " (" + req.status + ")";
|
err = "Error " + req.statusText + " (" + req.status + ")";
|
||||||
}
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
if (err) {
|
if (err) {
|
||||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
if (/captcha|verification/i.test(err.textContent) || connErr) {
|
||||||
if (/mistyped/i.test(err.textContent)) {
|
if (/mistyped/i.test(err.textContent)) {
|
||||||
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
err = 'You mistyped the CAPTCHA, or the CAPTCHA malfunctioned.';
|
||||||
} else if (/expired/i.test(err.textContent)) {
|
} else if (/expired/i.test(err.textContent)) {
|
||||||
err = 'This CAPTCHA is no longer valid because it has expired.';
|
err = 'This CAPTCHA is no longer valid because it has expired.';
|
||||||
}
|
}
|
||||||
QR.cooldown.auto = QR.captcha.isEnabled || err === 'Connection error with sys.4chan.org.';
|
QR.cooldown.auto = QR.captcha.isEnabled || connErr;
|
||||||
QR.cooldown.addDelay(post, 2);
|
QR.cooldown.addDelay(post, 2);
|
||||||
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
} else if (err.textContent && (m = err.textContent.match(/(?:(\d+)\s+minutes?\s+)?(\d+)\s+second/i)) && !/duplicate|hour/i.test(err.textContent)) {
|
||||||
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
QR.cooldown.auto = !/have\s+been\s+muted/i.test(err.textContent);
|
||||||
@ -21655,9 +21623,6 @@ QR = (function() {
|
|||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
}
|
}
|
||||||
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
QR.captcha.setup(QR.cooldown.auto && ((ref1 = d.activeElement) === QR.nodes.status || ref1 === d.body));
|
||||||
if (QR.captcha.isEnabled && !QR.captcha.captchas.length) {
|
|
||||||
QR.cooldown.auto = false;
|
|
||||||
}
|
|
||||||
QR.status();
|
QR.status();
|
||||||
QR.error(err);
|
QR.error(err);
|
||||||
return;
|
return;
|
||||||
@ -21689,11 +21654,17 @@ QR = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
if (!(Conf['Persistent QR'] || postsCount)) {
|
if (postsCount) {
|
||||||
QR.close();
|
|
||||||
} else {
|
|
||||||
post.rm();
|
post.rm();
|
||||||
QR.captcha.setup(d.activeElement === QR.nodes.status);
|
} else if (Conf['Persistent QR']) {
|
||||||
|
post.rm();
|
||||||
|
if (Conf['Auto Hide QR']) {
|
||||||
|
QR.hide();
|
||||||
|
} else {
|
||||||
|
QR.blur();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QR.close();
|
||||||
}
|
}
|
||||||
QR.cleanNotifications();
|
QR.cleanNotifications();
|
||||||
if (Conf['Posting Success Notifications']) {
|
if (Conf['Posting Success Notifications']) {
|
||||||
@ -21738,6 +21709,10 @@ QR = (function() {
|
|||||||
if (QR.req && !QR.req.isUploadFinished) {
|
if (QR.req && !QR.req.isUploadFinished) {
|
||||||
QR.req.abort();
|
QR.req.abort();
|
||||||
delete QR.req;
|
delete QR.req;
|
||||||
|
if (QR.currentCaptcha) {
|
||||||
|
Captcha.cache.save(QR.currentCaptcha);
|
||||||
|
}
|
||||||
|
delete QR.currentCaptcha;
|
||||||
QR.posts[0].unlock();
|
QR.posts[0].unlock();
|
||||||
QR.cooldown.auto = false;
|
QR.cooldown.auto = false;
|
||||||
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
QR.notifications.push(new Notice('info', 'QR upload aborted.', 5));
|
||||||
@ -21985,7 +21960,7 @@ QR = (function() {
|
|||||||
$.on(a, 'click', this.editFile);
|
$.on(a, 'click', this.editFile);
|
||||||
return Menu.menu.addEntry({
|
return Menu.menu.addEntry({
|
||||||
el: a,
|
el: a,
|
||||||
order: 95,
|
order: 90,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
var file;
|
var file;
|
||||||
QR.oekaki.menu.post = post;
|
QR.oekaki.menu.post = post;
|
||||||
@ -22343,9 +22318,7 @@ QR = (function() {
|
|||||||
this.select();
|
this.select();
|
||||||
}
|
}
|
||||||
this.unlock();
|
this.unlock();
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onNewPost();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_Class.prototype.rm = function() {
|
_Class.prototype.rm = function() {
|
||||||
@ -22494,9 +22467,7 @@ QR = (function() {
|
|||||||
QR.characterCount();
|
QR.characterCount();
|
||||||
}
|
}
|
||||||
this.nodes.span.textContent = this.com;
|
this.nodes.span.textContent = this.com;
|
||||||
return $.queueTask(function() {
|
return QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_Class.rmErrored = function(e) {
|
_Class.rmErrored = function(e) {
|
||||||
@ -22583,9 +22554,7 @@ QR = (function() {
|
|||||||
this.filesize = $.bytesToString(this.file.size);
|
this.filesize = $.bytesToString(this.file.size);
|
||||||
this.checkSize();
|
this.checkSize();
|
||||||
$.addClass(this.nodes.el, 'has-file');
|
$.addClass(this.nodes.el, 'has-file');
|
||||||
$.queueTask(function() {
|
QR.captcha.moreNeeded();
|
||||||
return QR.captcha.onPostChange();
|
|
||||||
});
|
|
||||||
URL.revokeObjectURL(this.URL);
|
URL.revokeObjectURL(this.URL);
|
||||||
this.saveFilename();
|
this.saveFilename();
|
||||||
if (this === QR.selected) {
|
if (this === QR.selected) {
|
||||||
@ -23598,7 +23567,7 @@ QuoteYou = (function() {
|
|||||||
$.on(input, 'change', QuoteYou.menu.toggle);
|
$.on(input, 'change', QuoteYou.menu.toggle);
|
||||||
return (ref = Menu.menu) != null ? ref.addEntry({
|
return (ref = Menu.menu) != null ? ref.addEntry({
|
||||||
el: label,
|
el: label,
|
||||||
order: 12,
|
order: 80,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
QuoteYou.menu.post = post.origin || post;
|
QuoteYou.menu.post = post.origin || post;
|
||||||
input.checked = QuoteYou.isYou(post);
|
input.checked = QuoteYou.isYou(post);
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.7.2' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.13.8.0' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.7.2' />
|
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.13.8.0' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"version": "1.13.7.2",
|
"version": "1.13.8.0",
|
||||||
"date": "2017-02-06T08:39:20.054Z"
|
"date": "2017-02-07T20:07:59.893Z"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user