Release 4chan X v1.11.14.4.

This commit is contained in:
ccd0 2015-10-26 11:30:08 -07:00
parent 50e3e6dead
commit 882725181a
13 changed files with 141 additions and 69 deletions

View File

@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.14 ### v1.11.14
**v1.11.14.4** *(2015-10-26)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.4/builds/4chan-X-noupdate.crx "Chromium version")]
- Support drawing on frames from WebMs.
**v1.11.14.3** *(2015-10-25)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.3/builds/4chan-X-noupdate.crx "Chromium version")] **v1.11.14.3** *(2015-10-25)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.14.3/builds/4chan-X-noupdate.crx "Chromium version")]
- Support opening a blank canvas from boards other than /i/. With no file selected, oekaki button in QR shows/hides the new image controls. - Support opening a blank canvas from boards other than /i/. With no file selected, oekaki button in QR shows/hides the new image controls.
- Support resume (retaining layers and undo history) in Tegaki when possible. Only available when re-opening the last image edited. - Support resume (retaining layers and undo history) in Tegaki when possible. Only available when re-opening the last image edited.

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.11.14.3 // @version 1.11.14.4
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -414,7 +414,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.14.3', VERSION: '1.11.14.4',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -7376,7 +7376,7 @@
if (blob) { if (blob) {
return QR.handleFiles([blob]); return QR.handleFiles([blob]);
} else { } else {
return QR.error("Can't load image."); return QR.error("Can't load file.");
} }
}); });
}, },
@ -8951,8 +8951,8 @@
}); });
}, },
node: function() { node: function() {
var link, ref; var link;
if (!((ref = this.file) != null ? ref.isImage : void 0)) { if (!(this.file && (this.file.isImage || this.file.isVideo))) {
return; return;
} }
if (this.isClone) { if (this.isClone) {
@ -8971,19 +8971,41 @@
return $.on(link, 'click', QR.oekaki.editFile); return $.on(link, 'click', QR.oekaki.editFile);
}, },
editFile: function() { editFile: function() {
var post; var currentTime, isVideo, post, ref;
if (!QR.postingIsEnabled) { if (!QR.postingIsEnabled) {
return; return;
} }
QR.quote.call(this); QR.quote.call(this);
post = Get.postFromNode(this); post = Get.postFromNode(this);
isVideo = post.file.isVideo;
currentTime = ((ref = post.file.fullImage) != null ? ref.currentTime : void 0) || 0;
return CrossOrigin.file(post.file.url, function(blob) { return CrossOrigin.file(post.file.url, function(blob) {
if (blob) { var video;
if (!blob) {
return QR.error("Can't load file.");
} else if (isVideo) {
video = $.el('video');
$.on(video, 'loadedmetadata', function() {
$.on(video, 'seeked', function() {
var canvas;
canvas = $.el('canvas', {
width: video.videoWidth,
height: video.videoHeight
});
canvas.getContext('2d').drawImage(video, 0, 0);
return canvas.toBlob(function(snapshot) {
snapshot.name = post.file.name.replace(/\.\w+$/, '') + '.png';
QR.handleFiles([snapshot]);
return QR.oekaki.edit();
});
});
return video.currentTime = currentTime;
});
return video.src = URL.createObjectURL(blob);
} else {
blob.name = post.file.name; blob.name = post.file.name;
QR.handleFiles([blob]); QR.handleFiles([blob]);
return QR.oekaki.edit(); return QR.oekaki.edit();
} else {
return QR.error("Can't load image.");
} }
}); });
}, },
@ -9075,19 +9097,20 @@
})); }));
}; };
cb = function(e) { cb = function(e) {
var img; var file, isVideo;
document.removeEventListener('QRFile', cb, false); document.removeEventListener('QRFile', cb, false);
if (!e.detail) { if (!e.detail) {
return error('No file to edit.'); return error('No file to edit.');
} }
if (!/^image\//.test(e.detail.type)) { if (!/^(image|video)\//.test(e.detail.type)) {
return error('Not an image.'); return error('Not an image.');
} }
img = new Image(); isVideo = /^video\//.test(e.detail.type);
img.onerror = function() { file = document.createElement(isVideo ? 'video' : 'img');
return error('Could not open image.'); file.addEventListener('error', function() {
}; return error('Could not open file.', false);
img.onload = function() { });
file.addEventListener((isVideo ? 'loadeddata' : 'load'), function() {
if (Tegaki.bg) { if (Tegaki.bg) {
Tegaki.destroy(); Tegaki.destroy();
} }
@ -9095,13 +9118,13 @@
Tegaki.open({ Tegaki.open({
onDone: FCX.oekakiCB, onDone: FCX.oekakiCB,
onCancel: function() {}, onCancel: function() {},
width: img.naturalWidth, width: file.naturalWidth || file.videoWidth,
height: img.naturalHeight, height: file.naturalHeight || file.videoHeight,
bgColor: 'transparent' bgColor: 'transparent'
}); });
return Tegaki.activeCtx.drawImage(img, 0, 0); return Tegaki.activeCtx.drawImage(file, 0, 0);
}; }, false);
return img.src = URL.createObjectURL(e.detail); return file.src = URL.createObjectURL(e.detail);
}; };
if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) { if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) {
FCX.oekakiName = name; FCX.oekakiName = name;

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.11.14.3 // @version 1.11.14.4
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -414,7 +414,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.14.3', VERSION: '1.11.14.4',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -7376,7 +7376,7 @@
if (blob) { if (blob) {
return QR.handleFiles([blob]); return QR.handleFiles([blob]);
} else { } else {
return QR.error("Can't load image."); return QR.error("Can't load file.");
} }
}); });
}, },
@ -8951,8 +8951,8 @@
}); });
}, },
node: function() { node: function() {
var link, ref; var link;
if (!((ref = this.file) != null ? ref.isImage : void 0)) { if (!(this.file && (this.file.isImage || this.file.isVideo))) {
return; return;
} }
if (this.isClone) { if (this.isClone) {
@ -8971,19 +8971,41 @@
return $.on(link, 'click', QR.oekaki.editFile); return $.on(link, 'click', QR.oekaki.editFile);
}, },
editFile: function() { editFile: function() {
var post; var currentTime, isVideo, post, ref;
if (!QR.postingIsEnabled) { if (!QR.postingIsEnabled) {
return; return;
} }
QR.quote.call(this); QR.quote.call(this);
post = Get.postFromNode(this); post = Get.postFromNode(this);
isVideo = post.file.isVideo;
currentTime = ((ref = post.file.fullImage) != null ? ref.currentTime : void 0) || 0;
return CrossOrigin.file(post.file.url, function(blob) { return CrossOrigin.file(post.file.url, function(blob) {
if (blob) { var video;
if (!blob) {
return QR.error("Can't load file.");
} else if (isVideo) {
video = $.el('video');
$.on(video, 'loadedmetadata', function() {
$.on(video, 'seeked', function() {
var canvas;
canvas = $.el('canvas', {
width: video.videoWidth,
height: video.videoHeight
});
canvas.getContext('2d').drawImage(video, 0, 0);
return canvas.toBlob(function(snapshot) {
snapshot.name = post.file.name.replace(/\.\w+$/, '') + '.png';
QR.handleFiles([snapshot]);
return QR.oekaki.edit();
});
});
return video.currentTime = currentTime;
});
return video.src = URL.createObjectURL(blob);
} else {
blob.name = post.file.name; blob.name = post.file.name;
QR.handleFiles([blob]); QR.handleFiles([blob]);
return QR.oekaki.edit(); return QR.oekaki.edit();
} else {
return QR.error("Can't load image.");
} }
}); });
}, },
@ -9075,19 +9097,20 @@
})); }));
}; };
cb = function(e) { cb = function(e) {
var img; var file, isVideo;
document.removeEventListener('QRFile', cb, false); document.removeEventListener('QRFile', cb, false);
if (!e.detail) { if (!e.detail) {
return error('No file to edit.'); return error('No file to edit.');
} }
if (!/^image\//.test(e.detail.type)) { if (!/^(image|video)\//.test(e.detail.type)) {
return error('Not an image.'); return error('Not an image.');
} }
img = new Image(); isVideo = /^video\//.test(e.detail.type);
img.onerror = function() { file = document.createElement(isVideo ? 'video' : 'img');
return error('Could not open image.'); file.addEventListener('error', function() {
}; return error('Could not open file.', false);
img.onload = function() { });
file.addEventListener((isVideo ? 'loadeddata' : 'load'), function() {
if (Tegaki.bg) { if (Tegaki.bg) {
Tegaki.destroy(); Tegaki.destroy();
} }
@ -9095,13 +9118,13 @@
Tegaki.open({ Tegaki.open({
onDone: FCX.oekakiCB, onDone: FCX.oekakiCB,
onCancel: function() {}, onCancel: function() {},
width: img.naturalWidth, width: file.naturalWidth || file.videoWidth,
height: img.naturalHeight, height: file.naturalHeight || file.videoHeight,
bgColor: 'transparent' bgColor: 'transparent'
}); });
return Tegaki.activeCtx.drawImage(img, 0, 0); return Tegaki.activeCtx.drawImage(file, 0, 0);
}; }, false);
return img.src = URL.createObjectURL(e.detail); return file.src = URL.createObjectURL(e.detail);
}; };
if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) { if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) {
FCX.oekakiName = name; FCX.oekakiName = name;

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.11.14.3 // @version 1.11.14.4
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -414,7 +414,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.14.3', VERSION: '1.11.14.4',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -7376,7 +7376,7 @@
if (blob) { if (blob) {
return QR.handleFiles([blob]); return QR.handleFiles([blob]);
} else { } else {
return QR.error("Can't load image."); return QR.error("Can't load file.");
} }
}); });
}, },
@ -8951,8 +8951,8 @@
}); });
}, },
node: function() { node: function() {
var link, ref; var link;
if (!((ref = this.file) != null ? ref.isImage : void 0)) { if (!(this.file && (this.file.isImage || this.file.isVideo))) {
return; return;
} }
if (this.isClone) { if (this.isClone) {
@ -8971,19 +8971,41 @@
return $.on(link, 'click', QR.oekaki.editFile); return $.on(link, 'click', QR.oekaki.editFile);
}, },
editFile: function() { editFile: function() {
var post; var currentTime, isVideo, post, ref;
if (!QR.postingIsEnabled) { if (!QR.postingIsEnabled) {
return; return;
} }
QR.quote.call(this); QR.quote.call(this);
post = Get.postFromNode(this); post = Get.postFromNode(this);
isVideo = post.file.isVideo;
currentTime = ((ref = post.file.fullImage) != null ? ref.currentTime : void 0) || 0;
return CrossOrigin.file(post.file.url, function(blob) { return CrossOrigin.file(post.file.url, function(blob) {
if (blob) { var video;
if (!blob) {
return QR.error("Can't load file.");
} else if (isVideo) {
video = $.el('video');
$.on(video, 'loadedmetadata', function() {
$.on(video, 'seeked', function() {
var canvas;
canvas = $.el('canvas', {
width: video.videoWidth,
height: video.videoHeight
});
canvas.getContext('2d').drawImage(video, 0, 0);
return canvas.toBlob(function(snapshot) {
snapshot.name = post.file.name.replace(/\.\w+$/, '') + '.png';
QR.handleFiles([snapshot]);
return QR.oekaki.edit();
});
});
return video.currentTime = currentTime;
});
return video.src = URL.createObjectURL(blob);
} else {
blob.name = post.file.name; blob.name = post.file.name;
QR.handleFiles([blob]); QR.handleFiles([blob]);
return QR.oekaki.edit(); return QR.oekaki.edit();
} else {
return QR.error("Can't load image.");
} }
}); });
}, },
@ -9075,19 +9097,20 @@
})); }));
}; };
cb = function(e) { cb = function(e) {
var img; var file, isVideo;
document.removeEventListener('QRFile', cb, false); document.removeEventListener('QRFile', cb, false);
if (!e.detail) { if (!e.detail) {
return error('No file to edit.'); return error('No file to edit.');
} }
if (!/^image\//.test(e.detail.type)) { if (!/^(image|video)\//.test(e.detail.type)) {
return error('Not an image.'); return error('Not an image.');
} }
img = new Image(); isVideo = /^video\//.test(e.detail.type);
img.onerror = function() { file = document.createElement(isVideo ? 'video' : 'img');
return error('Could not open image.'); file.addEventListener('error', function() {
}; return error('Could not open file.', false);
img.onload = function() { });
file.addEventListener((isVideo ? 'loadeddata' : 'load'), function() {
if (Tegaki.bg) { if (Tegaki.bg) {
Tegaki.destroy(); Tegaki.destroy();
} }
@ -9095,13 +9118,13 @@
Tegaki.open({ Tegaki.open({
onDone: FCX.oekakiCB, onDone: FCX.oekakiCB,
onCancel: function() {}, onCancel: function() {},
width: img.naturalWidth, width: file.naturalWidth || file.videoWidth,
height: img.naturalHeight, height: file.naturalHeight || file.videoHeight,
bgColor: 'transparent' bgColor: 'transparent'
}); });
return Tegaki.activeCtx.drawImage(img, 0, 0); return Tegaki.activeCtx.drawImage(file, 0, 0);
}; }, false);
return img.src = URL.createObjectURL(e.detail); return file.src = URL.createObjectURL(e.detail);
}; };
if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) { if (Tegaki.bg && Tegaki.onDoneCb === FCX.oekakiCB && source === FCX.oekakiLatest) {
FCX.oekakiName = name; FCX.oekakiName = name;

Binary file not shown.

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.11.14.3' /> <updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.14.4' />
</app> </app>
</gupdate> </gupdate>

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.11.14.3' /> <updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.14.4' />
</app> </app>
</gupdate> </gupdate>

View File

@ -4,8 +4,8 @@
"meta": { "meta": {
"name": "4chan X", "name": "4chan X",
"fork": "ccd0", "fork": "ccd0",
"version": "1.11.14.3", "version": "1.11.14.4",
"date": "2015-10-26T06:21:56.818Z", "date": "2015-10-26T18:29:12.872Z",
"page": "https://www.4chan-x.net/", "page": "https://www.4chan-x.net/",
"downloads": "https://www.4chan-x.net/builds/", "downloads": "https://www.4chan-x.net/builds/",
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/", "oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",