diff --git a/CHANGELOG.md b/CHANGELOG.md
index 467b9e6e6..147177016 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+### v1.7.41
+*2014-05-17*
+
**ccd0, Zixaphir**
- Bug fixes.
diff --git a/LICENSE b/LICENSE
index a7c9e42b1..115ad8caf 100755
--- a/LICENSE
+++ b/LICENSE
@@ -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
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index dc34b098e..b9ea3af7a 100755
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.7.40
+// @version 1.7.41
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index baaf76008..b1a15aa32 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -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: '
'
+ innerHTML: ''
});
$.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 version 1.7.40.'
+ innerHTML: '4chan X has been updated to version 1.7.41.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/crx.crx b/builds/crx.crx
index 58cd6bf34..016383a0b 100644
Binary files a/builds/crx.crx and b/builds/crx.crx differ
diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json
index fd1176ea8..96b88fd98 100755
--- a/builds/crx/manifest.json
+++ b/builds/crx/manifest.json
@@ -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": {
diff --git a/builds/crx/script.js b/builds/crx/script.js
index f3900b8d8..ba97a29ff 100644
--- a/builds/crx/script.js
+++ b/builds/crx/script.js
@@ -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: ''
+ innerHTML: ''
});
$.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 version 1.7.40.'
+ innerHTML: '4chan X has been updated to version 1.7.41.'
});
new Notice('info', el, 15);
} else {
diff --git a/builds/updates.xml b/builds/updates.xml
index e2dabd317..8188e3574 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/package.json b/package.json
index 4c26a6f0d..1e4933034 100755
--- a/package.json
+++ b/package.json
@@ -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",