Release 4chan X v1.11.3.2.
This commit is contained in:
parent
50aebd3ddd
commit
afe28309b1
@ -4,6 +4,9 @@ The links to individual versions below are to copies of the script with the upda
|
|||||||
|
|
||||||
### v1.11.3
|
### v1.11.3
|
||||||
|
|
||||||
|
**v1.11.3.2** *(2015-07-05)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.2/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.2/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
- Get posting from URLs, WebM titles, and Vocaroo/Clyp embedding working in Safari.
|
||||||
|
|
||||||
**v1.11.3.1** *(2015-07-04)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.1/builds/4chan-X-noupdate.crx "Chromium version")]
|
**v1.11.3.1** *(2015-07-04)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.3.1/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
- Make posting from URL more efficient, and make it work in Tampermonkey.
|
- Make posting from URL more efficient, and make it work in Tampermonkey.
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.11.3.1
|
// @version 1.11.3.2
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.11.3.1
|
// @version 1.11.3.2
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -412,7 +412,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.11.3.1',
|
VERSION: '1.11.3.2',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -4920,17 +4920,18 @@
|
|||||||
CrossOrigin = (function() {
|
CrossOrigin = (function() {
|
||||||
return {
|
return {
|
||||||
binary: function(url, cb, headers) {
|
binary: function(url, cb, headers) {
|
||||||
var options, workaround;
|
var options, ref, workaround;
|
||||||
if (headers == null) {
|
if (headers == null) {
|
||||||
headers = {};
|
headers = {};
|
||||||
}
|
}
|
||||||
workaround = !GM_info.scriptHandler && /^[12]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
||||||
|
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
|
||||||
options = {
|
options = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
onload: function(xhr) {
|
onload: function(xhr) {
|
||||||
var contentDisposition, contentType, data, i, r, ref, ref1;
|
var contentDisposition, contentType, data, i, r, ref1, ref2;
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
r = xhr.responseText;
|
r = xhr.responseText;
|
||||||
data = new Uint8Array(r.length);
|
data = new Uint8Array(r.length);
|
||||||
@ -4942,8 +4943,13 @@
|
|||||||
} else {
|
} else {
|
||||||
data = new Uint8Array(xhr.response);
|
data = new Uint8Array(xhr.response);
|
||||||
}
|
}
|
||||||
contentType = (ref = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref[1] : void 0;
|
if (typeof xhr.responseHeaders === 'object') {
|
||||||
contentDisposition = (ref1 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
contentType = xhr.responseHeaders['Content-Type'];
|
||||||
|
contentDisposition = xhr.responseHeaders['Content-Disposition'];
|
||||||
|
} else {
|
||||||
|
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
||||||
|
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
|
||||||
|
}
|
||||||
return cb(data, contentType, contentDisposition);
|
return cb(data, contentType, contentDisposition);
|
||||||
},
|
},
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
@ -4954,7 +4960,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
options.overrideMimeType = 'text/plain; charset=x-user-defined';
|
options.overrideMimeType = options.mimeType = 'text/plain; charset=x-user-defined';
|
||||||
} else {
|
} else {
|
||||||
options.responseType = 'arraybuffer';
|
options.responseType = 'arraybuffer';
|
||||||
}
|
}
|
||||||
@ -4962,7 +4968,7 @@
|
|||||||
},
|
},
|
||||||
file: function(url, cb) {
|
file: function(url, cb) {
|
||||||
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
||||||
var blob, match, mime, name, ref, ref1, ref2;
|
var blob, match, mime, name, ref, ref1, ref2, ref3;
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return cb(null);
|
return cb(null);
|
||||||
}
|
}
|
||||||
@ -4972,6 +4978,9 @@
|
|||||||
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) {
|
||||||
|
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
|
||||||
|
}
|
||||||
blob = new Blob([data], {
|
blob = new Blob([data], {
|
||||||
type: mime
|
type: mime
|
||||||
});
|
});
|
||||||
@ -6764,6 +6773,15 @@
|
|||||||
|
|
||||||
QR = {
|
QR = {
|
||||||
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
||||||
|
typeFromExtension: {
|
||||||
|
'jpg': 'image/jpeg',
|
||||||
|
'jpeg': 'image/jpeg',
|
||||||
|
'png': 'image/png',
|
||||||
|
'gif': 'image/gif',
|
||||||
|
'pdf': 'application/pdf',
|
||||||
|
'swf': 'application/vnd.adobe.flash.movie',
|
||||||
|
'webm': 'video/webm'
|
||||||
|
},
|
||||||
init: function() {
|
init: function() {
|
||||||
var noscript, sc, version;
|
var noscript, sc, version;
|
||||||
if (!Conf['Quick Reply']) {
|
if (!Conf['Quick Reply']) {
|
||||||
@ -9466,6 +9484,9 @@
|
|||||||
var el, event, isVideo, onerror, onload;
|
var el, event, isVideo, onerror, onload;
|
||||||
isVideo = /^video\//.test(this.file.type);
|
isVideo = /^video\//.test(this.file.type);
|
||||||
el = $.el(isVideo ? 'video' : 'img');
|
el = $.el(isVideo ? 'video' : 'img');
|
||||||
|
if (isVideo && !el.canPlayType(this.file.type)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event = isVideo ? 'loadeddata' : 'load';
|
event = isVideo ? 'loadeddata' : 'load';
|
||||||
onload = (function(_this) {
|
onload = (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
@ -11817,11 +11838,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_" + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Vimeo',
|
key: 'Vimeo',
|
||||||
@ -11961,11 +11985,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://clyp.it/" + a.dataset.uid + ".ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://clyp.it/" + a.dataset.uid + "." + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Loopvid-dummy',
|
key: 'Loopvid-dummy',
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.11.3.1
|
// @version 1.11.3.2
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -411,7 +411,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.11.3.1',
|
VERSION: '1.11.3.2',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -4919,17 +4919,18 @@
|
|||||||
CrossOrigin = (function() {
|
CrossOrigin = (function() {
|
||||||
return {
|
return {
|
||||||
binary: function(url, cb, headers) {
|
binary: function(url, cb, headers) {
|
||||||
var options, workaround;
|
var options, ref, workaround;
|
||||||
if (headers == null) {
|
if (headers == null) {
|
||||||
headers = {};
|
headers = {};
|
||||||
}
|
}
|
||||||
workaround = !GM_info.scriptHandler && /^[12]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
||||||
|
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
|
||||||
options = {
|
options = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
onload: function(xhr) {
|
onload: function(xhr) {
|
||||||
var contentDisposition, contentType, data, i, r, ref, ref1;
|
var contentDisposition, contentType, data, i, r, ref1, ref2;
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
r = xhr.responseText;
|
r = xhr.responseText;
|
||||||
data = new Uint8Array(r.length);
|
data = new Uint8Array(r.length);
|
||||||
@ -4941,8 +4942,13 @@
|
|||||||
} else {
|
} else {
|
||||||
data = new Uint8Array(xhr.response);
|
data = new Uint8Array(xhr.response);
|
||||||
}
|
}
|
||||||
contentType = (ref = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref[1] : void 0;
|
if (typeof xhr.responseHeaders === 'object') {
|
||||||
contentDisposition = (ref1 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
contentType = xhr.responseHeaders['Content-Type'];
|
||||||
|
contentDisposition = xhr.responseHeaders['Content-Disposition'];
|
||||||
|
} else {
|
||||||
|
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
||||||
|
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
|
||||||
|
}
|
||||||
return cb(data, contentType, contentDisposition);
|
return cb(data, contentType, contentDisposition);
|
||||||
},
|
},
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
@ -4953,7 +4959,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
options.overrideMimeType = 'text/plain; charset=x-user-defined';
|
options.overrideMimeType = options.mimeType = 'text/plain; charset=x-user-defined';
|
||||||
} else {
|
} else {
|
||||||
options.responseType = 'arraybuffer';
|
options.responseType = 'arraybuffer';
|
||||||
}
|
}
|
||||||
@ -4961,7 +4967,7 @@
|
|||||||
},
|
},
|
||||||
file: function(url, cb) {
|
file: function(url, cb) {
|
||||||
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
||||||
var blob, match, mime, name, ref, ref1, ref2;
|
var blob, match, mime, name, ref, ref1, ref2, ref3;
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return cb(null);
|
return cb(null);
|
||||||
}
|
}
|
||||||
@ -4971,6 +4977,9 @@
|
|||||||
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) {
|
||||||
|
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
|
||||||
|
}
|
||||||
blob = new Blob([data], {
|
blob = new Blob([data], {
|
||||||
type: mime
|
type: mime
|
||||||
});
|
});
|
||||||
@ -6763,6 +6772,15 @@
|
|||||||
|
|
||||||
QR = {
|
QR = {
|
||||||
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
||||||
|
typeFromExtension: {
|
||||||
|
'jpg': 'image/jpeg',
|
||||||
|
'jpeg': 'image/jpeg',
|
||||||
|
'png': 'image/png',
|
||||||
|
'gif': 'image/gif',
|
||||||
|
'pdf': 'application/pdf',
|
||||||
|
'swf': 'application/vnd.adobe.flash.movie',
|
||||||
|
'webm': 'video/webm'
|
||||||
|
},
|
||||||
init: function() {
|
init: function() {
|
||||||
var noscript, sc, version;
|
var noscript, sc, version;
|
||||||
if (!Conf['Quick Reply']) {
|
if (!Conf['Quick Reply']) {
|
||||||
@ -9465,6 +9483,9 @@
|
|||||||
var el, event, isVideo, onerror, onload;
|
var el, event, isVideo, onerror, onload;
|
||||||
isVideo = /^video\//.test(this.file.type);
|
isVideo = /^video\//.test(this.file.type);
|
||||||
el = $.el(isVideo ? 'video' : 'img');
|
el = $.el(isVideo ? 'video' : 'img');
|
||||||
|
if (isVideo && !el.canPlayType(this.file.type)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event = isVideo ? 'loadeddata' : 'load';
|
event = isVideo ? 'loadeddata' : 'load';
|
||||||
onload = (function(_this) {
|
onload = (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
@ -11816,11 +11837,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_" + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Vimeo',
|
key: 'Vimeo',
|
||||||
@ -11960,11 +11984,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://clyp.it/" + a.dataset.uid + ".ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://clyp.it/" + a.dataset.uid + "." + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Loopvid-dummy',
|
key: 'Loopvid-dummy',
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.11.3.1
|
// @version 1.11.3.2
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.11.3.1
|
// @version 1.11.3.2
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -412,7 +412,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.11.3.1',
|
VERSION: '1.11.3.2',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -4920,17 +4920,18 @@
|
|||||||
CrossOrigin = (function() {
|
CrossOrigin = (function() {
|
||||||
return {
|
return {
|
||||||
binary: function(url, cb, headers) {
|
binary: function(url, cb, headers) {
|
||||||
var options, workaround;
|
var options, ref, workaround;
|
||||||
if (headers == null) {
|
if (headers == null) {
|
||||||
headers = {};
|
headers = {};
|
||||||
}
|
}
|
||||||
workaround = !GM_info.scriptHandler && /^[12]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
|
||||||
|
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
|
||||||
options = {
|
options = {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
onload: function(xhr) {
|
onload: function(xhr) {
|
||||||
var contentDisposition, contentType, data, i, r, ref, ref1;
|
var contentDisposition, contentType, data, i, r, ref1, ref2;
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
r = xhr.responseText;
|
r = xhr.responseText;
|
||||||
data = new Uint8Array(r.length);
|
data = new Uint8Array(r.length);
|
||||||
@ -4942,8 +4943,13 @@
|
|||||||
} else {
|
} else {
|
||||||
data = new Uint8Array(xhr.response);
|
data = new Uint8Array(xhr.response);
|
||||||
}
|
}
|
||||||
contentType = (ref = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref[1] : void 0;
|
if (typeof xhr.responseHeaders === 'object') {
|
||||||
contentDisposition = (ref1 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
contentType = xhr.responseHeaders['Content-Type'];
|
||||||
|
contentDisposition = xhr.responseHeaders['Content-Disposition'];
|
||||||
|
} else {
|
||||||
|
contentType = (ref1 = xhr.responseHeaders.match(/Content-Type:\s*(.*)/i)) != null ? ref1[1] : void 0;
|
||||||
|
contentDisposition = (ref2 = xhr.responseHeaders.match(/Content-Disposition:\s*(.*)/i)) != null ? ref2[1] : void 0;
|
||||||
|
}
|
||||||
return cb(data, contentType, contentDisposition);
|
return cb(data, contentType, contentDisposition);
|
||||||
},
|
},
|
||||||
onerror: function() {
|
onerror: function() {
|
||||||
@ -4954,7 +4960,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (workaround) {
|
if (workaround) {
|
||||||
options.overrideMimeType = 'text/plain; charset=x-user-defined';
|
options.overrideMimeType = options.mimeType = 'text/plain; charset=x-user-defined';
|
||||||
} else {
|
} else {
|
||||||
options.responseType = 'arraybuffer';
|
options.responseType = 'arraybuffer';
|
||||||
}
|
}
|
||||||
@ -4962,7 +4968,7 @@
|
|||||||
},
|
},
|
||||||
file: function(url, cb) {
|
file: function(url, cb) {
|
||||||
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
return CrossOrigin.binary(url, function(data, contentType, contentDisposition) {
|
||||||
var blob, match, mime, name, ref, ref1, ref2;
|
var blob, match, mime, name, ref, ref1, ref2, ref3;
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return cb(null);
|
return cb(null);
|
||||||
}
|
}
|
||||||
@ -4972,6 +4978,9 @@
|
|||||||
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) {
|
||||||
|
mime = QR.typeFromExtension[name.match(/[^.]*$/)[0].toLowerCase()] || 'application/octet-stream';
|
||||||
|
}
|
||||||
blob = new Blob([data], {
|
blob = new Blob([data], {
|
||||||
type: mime
|
type: mime
|
||||||
});
|
});
|
||||||
@ -6764,6 +6773,15 @@
|
|||||||
|
|
||||||
QR = {
|
QR = {
|
||||||
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
mimeTypes: ['image/jpeg', 'image/png', 'image/gif', 'application/pdf', 'application/vnd.adobe.flash.movie', 'application/x-shockwave-flash', 'video/webm'],
|
||||||
|
typeFromExtension: {
|
||||||
|
'jpg': 'image/jpeg',
|
||||||
|
'jpeg': 'image/jpeg',
|
||||||
|
'png': 'image/png',
|
||||||
|
'gif': 'image/gif',
|
||||||
|
'pdf': 'application/pdf',
|
||||||
|
'swf': 'application/vnd.adobe.flash.movie',
|
||||||
|
'webm': 'video/webm'
|
||||||
|
},
|
||||||
init: function() {
|
init: function() {
|
||||||
var noscript, sc, version;
|
var noscript, sc, version;
|
||||||
if (!Conf['Quick Reply']) {
|
if (!Conf['Quick Reply']) {
|
||||||
@ -9466,6 +9484,9 @@
|
|||||||
var el, event, isVideo, onerror, onload;
|
var el, event, isVideo, onerror, onload;
|
||||||
isVideo = /^video\//.test(this.file.type);
|
isVideo = /^video\//.test(this.file.type);
|
||||||
el = $.el(isVideo ? 'video' : 'img');
|
el = $.el(isVideo ? 'video' : 'img');
|
||||||
|
if (isVideo && !el.canPlayType(this.file.type)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event = isVideo ? 'loadeddata' : 'load';
|
event = isVideo ? 'loadeddata' : 'load';
|
||||||
onload = (function(_this) {
|
onload = (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
@ -11817,11 +11838,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?vocaroo\.com\/i\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://vocaroo.com/media_command.php?media=" + a.dataset.uid + "&command=download_" + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Vimeo',
|
key: 'Vimeo',
|
||||||
@ -11961,11 +11985,14 @@
|
|||||||
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/,
|
||||||
style: '',
|
style: '',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
var el, type;
|
||||||
|
el = $.el('audio', {
|
||||||
controls: true,
|
controls: true,
|
||||||
preload: 'auto',
|
preload: 'auto'
|
||||||
src: "http://clyp.it/" + a.dataset.uid + ".ogg"
|
|
||||||
});
|
});
|
||||||
|
type = el.canPlayType('audio/ogg') ? 'ogg' : 'mp3';
|
||||||
|
el.src = "http://clyp.it/" + a.dataset.uid + "." + type;
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'Loopvid-dummy',
|
key: 'Loopvid-dummy',
|
||||||
|
|||||||
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://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.11.3.1' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.11.3.2' />
|
||||||
</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://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.11.3.1' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.11.3.2' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.11.3.1",
|
"version": "1.11.3.2",
|
||||||
"date": "2015-07-04T21:55:48.953Z",
|
"date": "2015-07-05T10:21:13.314Z",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user