Release 4chan X v1.7.41.

This commit is contained in:
ccd0 2014-05-17 23:42:29 -07:00
parent 78a8f4921c
commit 200723d742
9 changed files with 42 additions and 31 deletions

View File

@ -1,3 +1,6 @@
### v1.7.41
*2014-05-17*
**ccd0, Zixaphir**
- Bug fixes.

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.7.40 - 2014-05-17
* 4chan X - Version 1.7.41 - 2014-05-17
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.7.40
// @version 1.7.41
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -24,7 +24,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.7.40 - 2014-05-17
* 4chan X - Version 1.7.41 - 2014-05-17
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -372,7 +372,7 @@
doc = d.documentElement;
g = {
VERSION: '1.7.40',
VERSION: '1.7.41',
NAMESPACE: '4chan X.',
boards: {}
};
@ -1726,7 +1726,11 @@
})();
Polyfill = {
init: function() {},
init: function() {
this.notificationPermission();
this.toBlob();
return this.visibility();
},
notificationPermission: function() {
if (!window.Notification || 'permission' in Notification || !window.webkitNotifications) {
return;
@ -2482,9 +2486,9 @@
$('.returnlink a', Index.navLinks).href = $('.returnlink a', Index.navLinksBot).href = "//boards.4chan.org/" + g.BOARD + "/";
return $('.cataloglink a', Index.navLinks).href = $('.cataloglink a', Index.navLinksBot).href = "//boards.4chan.org/" + g.BOARD + "/catalog";
},
scroll: $.debounce(100, function() {
scroll: function() {
var nodes, pageNum;
if (Index.req || Conf['Index Mode'] !== 'infinite' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (window.scrollY <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
if (Index.pageNum == null) {
@ -2500,7 +2504,7 @@
}
Index.buildStructure(nodes);
return Index.setPage(pageNum);
}),
},
endNotice: (function() {
var notify, reset;
notify = false;
@ -5831,6 +5835,7 @@
cb = _arg.detail;
return QR.preSubmitHooks.push(cb);
});
$.on(d, 'paste', QR.paste);
$.on(d, 'dragover', QR.dragOver);
$.on(d, 'drop', QR.dropFile);
$.on(d, 'dragstart dragend', QR.drag);
@ -6216,7 +6221,7 @@
return img.src = URL.createObjectURL(file);
} else if (/^video\//.test(file.type)) {
video = $.el('video');
$.on(video, 'loadedmetadata', function() {
$.on(video, 'loadeddata', function() {
var duration, max_height, max_width, pass, videoHeight, videoWidth;
if (!cb) {
return;
@ -6240,7 +6245,7 @@
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
pass = false;
}
if (video.mozHasAudio) {
if (video.mozHasAudio || video.webkitAudioDecodedByteCount) {
QR.error("" + file.name + ": Audio not allowed");
pass = false;
}
@ -6688,7 +6693,7 @@
isReply: isReply,
threadID: threadID
});
URL = threadID === postID ? "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
URL = threadID === postID ? "" + window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "" + window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
if (URL) {
if (Conf['Open Post in New Tab']) {
$.open(URL);
@ -12873,7 +12878,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a>&nbsp|&nbsp<a class=import>Import</a>&nbsp|&nbsp<a class=reset>Reset Settings</a>&nbsp|&nbsp<input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.7.40</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a>&nbsp|&nbsp<a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a>&nbsp|&nbsp<a class=import>Import</a>&nbsp|&nbsp<a class=reset>Reset Settings</a>&nbsp|&nbsp<input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.7.41</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a>&nbsp|&nbsp<a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@ -13531,7 +13536,7 @@
Report.init();
return;
case 'i.4cdn.org':
if (Conf['Loop in New Tab'] && (video = $('video'))) {
if (Conf['Loop in New Tab'] && document.body && (video = $('video'))) {
Video.configure(video);
$.on(video, 'click', function() {
if (!video.controls) {
@ -13712,7 +13717,7 @@
}
if (previousversion) {
el = $.el('span', {
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.7.40</a>.'
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.7.41</a>.'
});
new Notice('info', el, 15);
} else {

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "4chan X",
"version": "1.7.40",
"version": "1.7.41",
"manifest_version": 2,
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"icons": {

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* 4chan X - Version 1.7.40 - 2014-05-17
* 4chan X - Version 1.7.41 - 2014-05-17
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -348,7 +348,7 @@
doc = d.documentElement;
g = {
VERSION: '1.7.40',
VERSION: '1.7.41',
NAMESPACE: '4chan X.',
boards: {}
};
@ -1133,7 +1133,7 @@
};
Post.prototype.parseFile = function(that) {
var anchor, fileEl, fileText, size, thumb, unit, _ref, _ref1;
var anchor, fileEl, fileText, size, thumb, unit, _ref;
if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) {
return;
}
@ -1159,12 +1159,11 @@
if (this.file.isImage || this.file.isVideo) {
this.file.dimensions = (_ref = fileText.childNodes[2].textContent.match(/\d+x\d+/)) != null ? _ref[0] : void 0;
}
this.file.name = fileText.title || (function() {
return this.file.name = fileText.title || (function() {
var nameNode;
nameNode = $('span', fileText) || $('a', fileText);
return (nameNode != null ? nameNode.title : void 0) || (nameNode != null ? nameNode.textContent : void 0);
})();
return this.file.name = (_ref1 = this.file.name) != null ? _ref1.replace(/%22/g, '"') : void 0;
};
Post.prototype.cleanup = function(root) {
@ -2523,9 +2522,9 @@
$('.returnlink a', Index.navLinks).href = $('.returnlink a', Index.navLinksBot).href = "//boards.4chan.org/" + g.BOARD + "/";
return $('.cataloglink a', Index.navLinks).href = $('.cataloglink a', Index.navLinksBot).href = "//boards.4chan.org/" + g.BOARD + "/catalog";
},
scroll: $.debounce(100, function() {
scroll: function() {
var nodes, pageNum;
if (Index.req || Conf['Index Mode'] !== 'infinite' || (doc.scrollTop <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
if (Index.req || Conf['Index Mode'] !== 'infinite' || (window.scrollY <= doc.scrollHeight - (300 + window.innerHeight)) || g.VIEW === 'thread') {
return;
}
if (Index.pageNum == null) {
@ -2541,7 +2540,7 @@
}
Index.buildStructure(nodes);
return Index.setPage(pageNum);
}),
},
endNotice: (function() {
var notify, reset;
notify = false;
@ -6256,7 +6255,7 @@
return img.src = URL.createObjectURL(file);
} else if (/^video\//.test(file.type)) {
video = $.el('video');
$.on(video, 'loadedmetadata', function() {
$.on(video, 'loadeddata', function() {
var duration, max_height, max_width, pass, videoHeight, videoWidth;
if (!cb) {
return;
@ -6280,6 +6279,10 @@
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
pass = false;
}
if (video.mozHasAudio || video.webkitAudioDecodedByteCount) {
QR.error("" + file.name + ": Audio not allowed");
pass = false;
}
cb(pass, video);
return cb = null;
});
@ -6713,7 +6716,7 @@
isReply: isReply,
threadID: threadID
});
URL = threadID === postID ? "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
URL = threadID === postID ? "" + window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && !QR.cooldown.auto && Conf['Open Post in New Tab'] ? "" + window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0;
if (URL) {
if (Conf['Open Post in New Tab']) {
$.open(URL);
@ -12881,7 +12884,7 @@
Settings.dialog = dialog = $.el('div', {
id: 'fourchanx-settings',
className: 'dialog',
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a>&nbsp|&nbsp<a class=import>Import</a>&nbsp|&nbsp<a class=reset>Reset Settings</a>&nbsp|&nbsp<input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.7.40</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a>&nbsp|&nbsp<a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a>&nbsp|&nbsp<a class=import>Import</a>&nbsp|&nbsp<a class=reset>Reset Settings</a>&nbsp|&nbsp<input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.7.41</a>&nbsp|&nbsp<a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a>&nbsp|&nbsp<a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
});
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
@ -13536,7 +13539,7 @@
Report.init();
return;
case 'i.4cdn.org':
if (Conf['Loop in New Tab'] && (video = $('video'))) {
if (Conf['Loop in New Tab'] && document.body && (video = $('video'))) {
Video.configure(video);
$.on(video, 'click', function() {
if (!video.controls) {
@ -13707,7 +13710,7 @@
}
if (previousversion) {
el = $.el('span', {
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.7.40</a>.'
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.7.41</a>.'
});
new Notice('info', el, 15);
} else {

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://ccd0.github.io/4chan-x/builds/crx.crx' version='1.7.40' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/crx.crx' version='1.7.41' />
</app>
</gupdate>

View File

@ -1,6 +1,6 @@
{
"name": "4chan-X",
"version": "1.7.40",
"version": "1.7.41",
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",