Release 4chan X v1.11.9.0.

This commit is contained in:
ccd0 2015-08-15 11:46:35 -07:00
parent 8328f27567
commit e19b27ce65
13 changed files with 115 additions and 84 deletions

View File

@ -2,6 +2,13 @@
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.11.9
**v1.11.9.0** *(2015-08-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.9.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.11.8.8.
- Add `Randomize Filename` option: Replaces filenames with a random timestamp from the past year.
- Fix bugs with cached captchas when you change captcha settings.
### v1.11.8
**v1.11.8.8** *(2015-08-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.8.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.8.8/builds/4chan-X-noupdate.crx "Chromium version")]

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
// @version 1.11.8.8
// @version 1.11.9.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -238,6 +238,7 @@
'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 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],
'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1],
'Show New Thread Option in Threads': [false, 'Show the option to post a new / different thread from inside a thread.', 1],
'Show Name and Subject': [false, 'Show the classic name, email, and subject fields in the QR, even when 4chan doesn\'t use them all.', 1],
'Hide Original Post Form': [true, 'Hide the normal post form.', 1],
@ -411,7 +412,7 @@
doc = d.documentElement;
g = {
VERSION: '1.11.8.8',
VERSION: '1.11.9.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -6793,6 +6794,7 @@
QR = {
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
validExtension: /\.(jpe?g|png|gif|pdf|swf|webm)$/i,
typeFromExtension: {
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
@ -7252,7 +7254,7 @@
blob = new Blob([arr], {
type: m[1]
});
blob.name = "image." + m[2];
blob.name = "file." + m[2];
QR.handleFiles([blob]);
} else if (/^https?:\/\//.test(src)) {
QR.handleUrl(src);
@ -7597,7 +7599,7 @@
extra.form.append('recaptcha_challenge_field', response.challenge);
extra.form.append('recaptcha_response_field', response.response);
} else {
extra.form.append('g-recaptcha-response', response);
extra.form.append('g-recaptcha-response', response.response);
}
}
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
@ -8080,10 +8082,7 @@
if (captcha = this.captchas.shift()) {
this.count();
$.set('captchas', this.captchas);
return {
challenge: captcha.response,
response: 'manual_challenge'
};
return captcha;
} else if (/\S/.test(this.nodes.input.value)) {
return (function(_this) {
return function(cb) {
@ -8105,13 +8104,16 @@
}
},
save: function(token) {
var captcha;
delete this.occupied;
this.nodes.input.value = '';
captcha = {
challenge: token,
response: 'manual_challenge',
timeout: this.timeout
};
if (this.submitCB) {
this.submitCB({
challenge: token,
response: 'manual_challenge'
});
this.submitCB(captcha);
delete this.submitCB;
if (this.needed()) {
return this.reload();
@ -8120,10 +8122,7 @@
}
} else {
$.forceSync('captchas');
this.captchas.push({
response: token,
timeout: this.timeout
});
this.captchas.push(captcha);
this.count();
$.set('captchas', this.captchas);
return this.reload();
@ -8475,24 +8474,26 @@
return QR.captcha.count();
},
getOne: function() {
var captcha, challenge, response;
var captcha, challenge, response, timeout;
this.clear();
if (captcha = this.captchas.shift()) {
challenge = captcha.challenge, response = captcha.response;
this.count();
$.set('captchas', this.captchas);
return captcha;
} else {
challenge = this.nodes.img.alt;
timeout = this.timeout;
if (/\S/.test(response = this.nodes.input.value)) {
this.destroy();
return {
challenge: challenge,
response: response,
timeout: timeout
};
} else {
return null;
}
}
return {
challenge: challenge,
response: response
};
},
save: function() {
var response;
@ -8816,7 +8817,7 @@
if (captcha = this.captchas.shift()) {
$.set('captchas', this.captchas);
this.count();
return captcha.response;
return captcha;
} else {
return null;
}
@ -9474,9 +9475,16 @@
};
_Class.prototype.setFile = function(file1) {
var ref;
var ext, ref;
this.file = file1;
this.filename = this.file.name;
if (Conf['Randomize Filename'] && g.BOARD.ID !== 'f') {
this.filename = "" + (Date.now() - Math.floor(Math.random() * 365 * $.DAY));
if (ext = this.file.name.match(QR.validExtension)) {
this.filename += ext[0];
}
} else {
this.filename = this.file.name;
}
this.filesize = $.bytesToString(this.file.size);
this.checkSize();
if (QR.spoiler) {
@ -9631,7 +9639,7 @@
_Class.prototype.saveFilename = function() {
this.file.newName = (this.filename || '').replace(/[\/\\]/g, '-');
if (!/\.(jpe?g|png|gif|pdf|swf|webm)$/i.test(this.filename)) {
if (!QR.validExtension.test(this.filename)) {
return this.file.newName += '.jpg';
}
};

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.11.8.8
// @version 1.11.9.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -237,6 +237,7 @@
'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 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],
'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1],
'Show New Thread Option in Threads': [false, 'Show the option to post a new / different thread from inside a thread.', 1],
'Show Name and Subject': [false, 'Show the classic name, email, and subject fields in the QR, even when 4chan doesn\'t use them all.', 1],
'Hide Original Post Form': [true, 'Hide the normal post form.', 1],
@ -410,7 +411,7 @@
doc = d.documentElement;
g = {
VERSION: '1.11.8.8',
VERSION: '1.11.9.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -6792,6 +6793,7 @@
QR = {
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
validExtension: /\.(jpe?g|png|gif|pdf|swf|webm)$/i,
typeFromExtension: {
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
@ -7251,7 +7253,7 @@
blob = new Blob([arr], {
type: m[1]
});
blob.name = "image." + m[2];
blob.name = "file." + m[2];
QR.handleFiles([blob]);
} else if (/^https?:\/\//.test(src)) {
QR.handleUrl(src);
@ -7596,7 +7598,7 @@
extra.form.append('recaptcha_challenge_field', response.challenge);
extra.form.append('recaptcha_response_field', response.response);
} else {
extra.form.append('g-recaptcha-response', response);
extra.form.append('g-recaptcha-response', response.response);
}
}
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
@ -8079,10 +8081,7 @@
if (captcha = this.captchas.shift()) {
this.count();
$.set('captchas', this.captchas);
return {
challenge: captcha.response,
response: 'manual_challenge'
};
return captcha;
} else if (/\S/.test(this.nodes.input.value)) {
return (function(_this) {
return function(cb) {
@ -8104,13 +8103,16 @@
}
},
save: function(token) {
var captcha;
delete this.occupied;
this.nodes.input.value = '';
captcha = {
challenge: token,
response: 'manual_challenge',
timeout: this.timeout
};
if (this.submitCB) {
this.submitCB({
challenge: token,
response: 'manual_challenge'
});
this.submitCB(captcha);
delete this.submitCB;
if (this.needed()) {
return this.reload();
@ -8119,10 +8121,7 @@
}
} else {
$.forceSync('captchas');
this.captchas.push({
response: token,
timeout: this.timeout
});
this.captchas.push(captcha);
this.count();
$.set('captchas', this.captchas);
return this.reload();
@ -8474,24 +8473,26 @@
return QR.captcha.count();
},
getOne: function() {
var captcha, challenge, response;
var captcha, challenge, response, timeout;
this.clear();
if (captcha = this.captchas.shift()) {
challenge = captcha.challenge, response = captcha.response;
this.count();
$.set('captchas', this.captchas);
return captcha;
} else {
challenge = this.nodes.img.alt;
timeout = this.timeout;
if (/\S/.test(response = this.nodes.input.value)) {
this.destroy();
return {
challenge: challenge,
response: response,
timeout: timeout
};
} else {
return null;
}
}
return {
challenge: challenge,
response: response
};
},
save: function() {
var response;
@ -8815,7 +8816,7 @@
if (captcha = this.captchas.shift()) {
$.set('captchas', this.captchas);
this.count();
return captcha.response;
return captcha;
} else {
return null;
}
@ -9473,9 +9474,16 @@
};
_Class.prototype.setFile = function(file1) {
var ref;
var ext, ref;
this.file = file1;
this.filename = this.file.name;
if (Conf['Randomize Filename'] && g.BOARD.ID !== 'f') {
this.filename = "" + (Date.now() - Math.floor(Math.random() * 365 * $.DAY));
if (ext = this.file.name.match(QR.validExtension)) {
this.filename += ext[0];
}
} else {
this.filename = this.file.name;
}
this.filesize = $.bytesToString(this.file.size);
this.checkSize();
if (QR.spoiler) {
@ -9630,7 +9638,7 @@
_Class.prototype.saveFilename = function() {
this.file.newName = (this.filename || '').replace(/[\/\\]/g, '-');
if (!/\.(jpe?g|png|gif|pdf|swf|webm)$/i.test(this.filename)) {
if (!QR.validExtension.test(this.filename)) {
return this.file.newName += '.jpg';
}
};

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.11.8.8
// @version 1.11.9.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -238,6 +238,7 @@
'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 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],
'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1],
'Show New Thread Option in Threads': [false, 'Show the option to post a new / different thread from inside a thread.', 1],
'Show Name and Subject': [false, 'Show the classic name, email, and subject fields in the QR, even when 4chan doesn\'t use them all.', 1],
'Hide Original Post Form': [true, 'Hide the normal post form.', 1],
@ -411,7 +412,7 @@
doc = d.documentElement;
g = {
VERSION: '1.11.8.8',
VERSION: '1.11.9.0',
NAMESPACE: '4chan X.',
boards: {}
};
@ -6793,6 +6794,7 @@
QR = {
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
validExtension: /\.(jpe?g|png|gif|pdf|swf|webm)$/i,
typeFromExtension: {
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
@ -7252,7 +7254,7 @@
blob = new Blob([arr], {
type: m[1]
});
blob.name = "image." + m[2];
blob.name = "file." + m[2];
QR.handleFiles([blob]);
} else if (/^https?:\/\//.test(src)) {
QR.handleUrl(src);
@ -7597,7 +7599,7 @@
extra.form.append('recaptcha_challenge_field', response.challenge);
extra.form.append('recaptcha_response_field', response.response);
} else {
extra.form.append('g-recaptcha-response', response);
extra.form.append('g-recaptcha-response', response.response);
}
}
QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra);
@ -8080,10 +8082,7 @@
if (captcha = this.captchas.shift()) {
this.count();
$.set('captchas', this.captchas);
return {
challenge: captcha.response,
response: 'manual_challenge'
};
return captcha;
} else if (/\S/.test(this.nodes.input.value)) {
return (function(_this) {
return function(cb) {
@ -8105,13 +8104,16 @@
}
},
save: function(token) {
var captcha;
delete this.occupied;
this.nodes.input.value = '';
captcha = {
challenge: token,
response: 'manual_challenge',
timeout: this.timeout
};
if (this.submitCB) {
this.submitCB({
challenge: token,
response: 'manual_challenge'
});
this.submitCB(captcha);
delete this.submitCB;
if (this.needed()) {
return this.reload();
@ -8120,10 +8122,7 @@
}
} else {
$.forceSync('captchas');
this.captchas.push({
response: token,
timeout: this.timeout
});
this.captchas.push(captcha);
this.count();
$.set('captchas', this.captchas);
return this.reload();
@ -8475,24 +8474,26 @@
return QR.captcha.count();
},
getOne: function() {
var captcha, challenge, response;
var captcha, challenge, response, timeout;
this.clear();
if (captcha = this.captchas.shift()) {
challenge = captcha.challenge, response = captcha.response;
this.count();
$.set('captchas', this.captchas);
return captcha;
} else {
challenge = this.nodes.img.alt;
timeout = this.timeout;
if (/\S/.test(response = this.nodes.input.value)) {
this.destroy();
return {
challenge: challenge,
response: response,
timeout: timeout
};
} else {
return null;
}
}
return {
challenge: challenge,
response: response
};
},
save: function() {
var response;
@ -8816,7 +8817,7 @@
if (captcha = this.captchas.shift()) {
$.set('captchas', this.captchas);
this.count();
return captcha.response;
return captcha;
} else {
return null;
}
@ -9474,9 +9475,16 @@
};
_Class.prototype.setFile = function(file1) {
var ref;
var ext, ref;
this.file = file1;
this.filename = this.file.name;
if (Conf['Randomize Filename'] && g.BOARD.ID !== 'f') {
this.filename = "" + (Date.now() - Math.floor(Math.random() * 365 * $.DAY));
if (ext = this.file.name.match(QR.validExtension)) {
this.filename += ext[0];
}
} else {
this.filename = this.file.name;
}
this.filesize = $.bytesToString(this.file.size);
this.checkSize();
if (QR.spoiler) {
@ -9631,7 +9639,7 @@
_Class.prototype.saveFilename = function() {
this.file.newName = (this.filename || '').replace(/[\/\\]/g, '-');
if (!/\.(jpe?g|png|gif|pdf|swf|webm)$/i.test(this.filename)) {
if (!QR.validExtension.test(this.filename)) {
return this.file.newName += '.jpg';
}
};

Binary file not shown.

View File

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

View File

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

View File

@ -3,8 +3,8 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
"version": "1.11.8.8",
"date": "2015-08-15T17:24:37.293Z",
"version": "1.11.9.0",
"date": "2015-08-15T18:45:44.807Z",
"page": "https://www.4chan-x.net/",
"downloads": "https://www.4chan-x.net/builds/",
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",