Release 4chan X v1.14.7.2.

This commit is contained in:
ccd0 2019-04-11 08:51:49 -07:00
parent 03167b32e7
commit 70cc753290
15 changed files with 71 additions and 89 deletions

View File

@ -4,6 +4,12 @@
### v1.14.7 ### v1.14.7
**v1.14.7.2** *(2019-04-11)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.2/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.2/builds/4chan-X-noupdate.crx)]
- Fix dragging left to contract WebMs in Firefox. #1547
- Remove query string from filename in Post from URL feature.
- Speed up Post from URL on some platforms.
- Fix issue making WebM title fetching needlessly slow on Chrome extension.
**v1.14.7.1** *(2019-04-09)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.crx)] **v1.14.7.1** *(2019-04-09)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.7.1/builds/4chan-X-noupdate.crx)]
- Tolerate broken HTML better. - Tolerate broken HTML better.
- Fix 4chan/4channel not being correct in certain links. - Fix 4chan/4channel not being correct in certain links.

Binary file not shown.

View File

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

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.14.7.1 // @version 1.14.7.2
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.1', VERSION: '1.14.7.2',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5441,21 +5441,21 @@ CrossOrigin = (function() {
CrossOrigin = { CrossOrigin = {
binary: function(url, cb, headers) { binary: function(url, cb, headers) {
var options, ref, workaround;
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'); url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)({
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
options = {
method: "GET", method: "GET",
url: url, url: url,
headers: headers, headers: headers,
responseType: 'arraybuffer',
overrideMimeType: 'text/plain; charset=x-user-defined',
onload: function(xhr) { onload: function(xhr) {
var contentDisposition, contentType, data, i, r, ref1, ref2; var data, i, r;
if (workaround) { if (xhr.response instanceof ArrayBuffer) {
data = new Uint8Array(xhr.response);
} else {
r = xhr.responseText; r = xhr.responseText;
data = new Uint8Array(r.length); data = new Uint8Array(r.length);
i = 0; i = 0;
@ -5463,12 +5463,8 @@ CrossOrigin = (function() {
data[i] = r.charCodeAt(i); data[i] = r.charCodeAt(i);
i++; i++;
} }
} else {
data = new Uint8Array(xhr.response);
} }
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0; return cb(data, xhr.responseHeaders);
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
return cb(data, contentType, contentDisposition);
}, },
onerror: function() { onerror: function() {
return cb(null); return cb(null);
@ -5476,27 +5472,23 @@ CrossOrigin = (function() {
onabort: function() { onabort: function() {
return cb(null); return cb(null);
} }
}; });
if (workaround) {
options.overrideMimeType = 'text/plain; charset=x-user-defined';
} else {
options.responseType = 'arraybuffer';
}
return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)(options);
}, },
file: function(url, cb) { file: function(url, cb) {
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) { return CrossOrigin.binary(url, function(data, headers) {
var blob, match, mime, name, ref, ref1, ref2, ref3; var blob, contentDisposition, contentType, match, mime, name, ref, ref1, ref2, ref3, ref4;
if (data == null) { if (data == null) {
return cb(null); return cb(null);
} }
name = (ref = url.match(/([^\/]+)\/*$/)) != null ? ref[1] : void 0; name = (ref = url.match(/([^\/?#]+)\/*(?:$|[?#])/)) != null ? ref[1] : void 0;
contentType = (ref1 = headers.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
contentDisposition = (ref2 = headers.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream'; mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream';
match = (contentDisposition != null ? (ref1 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref1[1] : void 0 : void 0) || (contentType != null ? (ref2 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref2[1] : void 0 : void 0); match = (contentDisposition != null ? (ref3 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref3[1] : void 0 : void 0) || (contentType != null ? (ref4 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref4[1] : void 0 : void 0);
if (match) { if (match) {
name = match.replace(/\\"/g, '"'); name = match.replace(/\\"/g, '"');
} }
if ((typeof GM_info !== "undefined" && GM_info !== null ? (ref3 = GM_info.script) != null ? ref3.includeJSB : void 0 : void 0) != null) { if (/^text\/plain;\s*charset=x-user-defined$/i.test(mime)) {
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream'; mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
} }
blob = new Blob([data], { blob = new Blob([data], {
@ -14465,7 +14457,7 @@ ImageExpand = (function() {
} }
}, },
mouseout: function(e) { mouseout: function(e) {
if (mousedown && e.clientX <= this.getBoundingClientRect().left) { if (((e.buttons & 1) || mousedown) && e.clientX <= this.getBoundingClientRect().left) {
return ImageExpand.toggle(Get.postFromNode(this)); return ImageExpand.toggle(Get.postFromNode(this));
} }
} }

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.14.7.1 // @version 1.14.7.2
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.1', VERSION: '1.14.7.2',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5441,21 +5441,21 @@ CrossOrigin = (function() {
CrossOrigin = { CrossOrigin = {
binary: function(url, cb, headers) { binary: function(url, cb, headers) {
var options, ref, workaround;
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'); url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)({
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
options = {
method: "GET", method: "GET",
url: url, url: url,
headers: headers, headers: headers,
responseType: 'arraybuffer',
overrideMimeType: 'text/plain; charset=x-user-defined',
onload: function(xhr) { onload: function(xhr) {
var contentDisposition, contentType, data, i, r, ref1, ref2; var data, i, r;
if (workaround) { if (xhr.response instanceof ArrayBuffer) {
data = new Uint8Array(xhr.response);
} else {
r = xhr.responseText; r = xhr.responseText;
data = new Uint8Array(r.length); data = new Uint8Array(r.length);
i = 0; i = 0;
@ -5463,12 +5463,8 @@ CrossOrigin = (function() {
data[i] = r.charCodeAt(i); data[i] = r.charCodeAt(i);
i++; i++;
} }
} else {
data = new Uint8Array(xhr.response);
} }
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0; return cb(data, xhr.responseHeaders);
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
return cb(data, contentType, contentDisposition);
}, },
onerror: function() { onerror: function() {
return cb(null); return cb(null);
@ -5476,27 +5472,23 @@ CrossOrigin = (function() {
onabort: function() { onabort: function() {
return cb(null); return cb(null);
} }
}; });
if (workaround) {
options.overrideMimeType = 'text/plain; charset=x-user-defined';
} else {
options.responseType = 'arraybuffer';
}
return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)(options);
}, },
file: function(url, cb) { file: function(url, cb) {
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) { return CrossOrigin.binary(url, function(data, headers) {
var blob, match, mime, name, ref, ref1, ref2, ref3; var blob, contentDisposition, contentType, match, mime, name, ref, ref1, ref2, ref3, ref4;
if (data == null) { if (data == null) {
return cb(null); return cb(null);
} }
name = (ref = url.match(/([^\/]+)\/*$/)) != null ? ref[1] : void 0; name = (ref = url.match(/([^\/?#]+)\/*(?:$|[?#])/)) != null ? ref[1] : void 0;
contentType = (ref1 = headers.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
contentDisposition = (ref2 = headers.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream'; mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream';
match = (contentDisposition != null ? (ref1 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref1[1] : void 0 : void 0) || (contentType != null ? (ref2 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref2[1] : void 0 : void 0); match = (contentDisposition != null ? (ref3 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref3[1] : void 0 : void 0) || (contentType != null ? (ref4 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref4[1] : void 0 : void 0);
if (match) { if (match) {
name = match.replace(/\\"/g, '"'); name = match.replace(/\\"/g, '"');
} }
if ((typeof GM_info !== "undefined" && GM_info !== null ? (ref3 = GM_info.script) != null ? ref3.includeJSB : void 0 : void 0) != null) { if (/^text\/plain;\s*charset=x-user-defined$/i.test(mime)) {
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream'; mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
} }
blob = new Blob([data], { blob = new Blob([data], {
@ -14465,7 +14457,7 @@ ImageExpand = (function() {
} }
}, },
mouseout: function(e) { mouseout: function(e) {
if (mousedown && e.clientX <= this.getBoundingClientRect().left) { if (((e.buttons & 1) || mousedown) && e.clientX <= this.getBoundingClientRect().left) {
return ImageExpand.toggle(Get.postFromNode(this)); return ImageExpand.toggle(Get.postFromNode(this));
} }
} }

Binary file not shown.

View File

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

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.14.7.1 // @version 1.14.7.2
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -198,7 +198,7 @@ docSet = function() {
}; };
g = { g = {
VERSION: '1.14.7.1', VERSION: '1.14.7.2',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -5441,21 +5441,21 @@ CrossOrigin = (function() {
CrossOrigin = { CrossOrigin = {
binary: function(url, cb, headers) { binary: function(url, cb, headers) {
var options, ref, workaround;
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/'); url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)({
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
options = {
method: "GET", method: "GET",
url: url, url: url,
headers: headers, headers: headers,
responseType: 'arraybuffer',
overrideMimeType: 'text/plain; charset=x-user-defined',
onload: function(xhr) { onload: function(xhr) {
var contentDisposition, contentType, data, i, r, ref1, ref2; var data, i, r;
if (workaround) { if (xhr.response instanceof ArrayBuffer) {
data = new Uint8Array(xhr.response);
} else {
r = xhr.responseText; r = xhr.responseText;
data = new Uint8Array(r.length); data = new Uint8Array(r.length);
i = 0; i = 0;
@ -5463,12 +5463,8 @@ CrossOrigin = (function() {
data[i] = r.charCodeAt(i); data[i] = r.charCodeAt(i);
i++; i++;
} }
} else {
data = new Uint8Array(xhr.response);
} }
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0; return cb(data, xhr.responseHeaders);
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
return cb(data, contentType, contentDisposition);
}, },
onerror: function() { onerror: function() {
return cb(null); return cb(null);
@ -5476,27 +5472,23 @@ CrossOrigin = (function() {
onabort: function() { onabort: function() {
return cb(null); return cb(null);
} }
}; });
if (workaround) {
options.overrideMimeType = 'text/plain; charset=x-user-defined';
} else {
options.responseType = 'arraybuffer';
}
return ((typeof GM !== "undefined" && GM !== null ? GM.xmlHttpRequest : void 0) || GM_xmlhttpRequest)(options);
}, },
file: function(url, cb) { file: function(url, cb) {
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) { return CrossOrigin.binary(url, function(data, headers) {
var blob, match, mime, name, ref, ref1, ref2, ref3; var blob, contentDisposition, contentType, match, mime, name, ref, ref1, ref2, ref3, ref4;
if (data == null) { if (data == null) {
return cb(null); return cb(null);
} }
name = (ref = url.match(/([^\/]+)\/*$/)) != null ? ref[1] : void 0; name = (ref = url.match(/([^\/?#]+)\/*(?:$|[?#])/)) != null ? ref[1] : void 0;
contentType = (ref1 = headers.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
contentDisposition = (ref2 = headers.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream'; mime = (contentType != null ? contentType.match(/[^;]*/)[0] : void 0) || 'application/octet-stream';
match = (contentDisposition != null ? (ref1 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref1[1] : void 0 : void 0) || (contentType != null ? (ref2 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref2[1] : void 0 : void 0); match = (contentDisposition != null ? (ref3 = contentDisposition.match(/\bfilename\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref3[1] : void 0 : void 0) || (contentType != null ? (ref4 = contentType.match(/\bname\s*=\s*"((\\"|[^"])+)"/i)) != null ? ref4[1] : void 0 : void 0);
if (match) { if (match) {
name = match.replace(/\\"/g, '"'); name = match.replace(/\\"/g, '"');
} }
if ((typeof GM_info !== "undefined" && GM_info !== null ? (ref3 = GM_info.script) != null ? ref3.includeJSB : void 0 : void 0) != null) { if (/^text\/plain;\s*charset=x-user-defined$/i.test(mime)) {
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream'; mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
} }
blob = new Blob([data], { blob = new Blob([data], {
@ -14465,7 +14457,7 @@ ImageExpand = (function() {
} }
}, },
mouseout: function(e) { mouseout: function(e) {
if (mousedown && e.clientX <= this.getBoundingClientRect().left) { if (((e.buttons & 1) || mousedown) && e.clientX <= this.getBoundingClientRect().left) {
return ImageExpand.toggle(Get.postFromNode(this)); return ImageExpand.toggle(Get.postFromNode(this));
} }
} }

Binary file not shown.

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
{ {
"version": "1.14.7.1", "version": "1.14.7.2",
"date": "2019-04-09T17:45:20.859Z" "date": "2019-04-11T15:38:53.367Z"
} }