diff --git a/CHANGELOG.md b/CHANGELOG.md index 041f97e5d..a199891c2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The attributions below are for work that has been incorporated into the script a The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x). +### v1.9.21.7 +*2015-01-31* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.7/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.7/builds/4chan-X-noupdate.crx "Chromium version")] + +- Update WebM duration limit to 5 minutes on /gif/ and /wsg/. +- Restore audio check before posting on other boards. + ### v1.9.21.6 *2015-01-31* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.6/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/LICENSE b/LICENSE index 915d98408..4c6c0d889 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.9.21.6 +* 4chan X - Version 1.9.21.7 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index a3fae1aa2..4ccd0146e 100644 Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js index 1d939e8f3..70996bb35 100644 --- a/builds/4chan-X-beta.meta.js +++ b/builds/4chan-X-beta.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.9.21.6 +// @version 1.9.21.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index e7aaeef71..30721acb1 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.9.21.6 +// @version 1.9.21.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -25,7 +25,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.6 +* 4chan X - Version 1.9.21.7 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -397,7 +397,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.6', + VERSION: '1.9.21.7', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7112,7 +7112,7 @@ } else if (/^video\//.test(file.type)) { video = $.el('video'); $.on(video, 'loadeddata', function() { - var duration, max_height, max_width, pass, videoHeight, videoWidth; + var duration, max_height, max_width, pass, videoHeight, videoWidth, _ref; if (!cb) { return; } @@ -7135,6 +7135,10 @@ QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)"); pass = false; } + if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) { + QR.error("" + file.name + ": Audio not allowed"); + pass = false; + } cb(pass, video); return cb = null; }); @@ -7200,7 +7204,7 @@ return (g.VIEW === 'thread' ? $.addClass : $.rmClass)(QR.nodes.el, 'reply-to-thread'); }, dialog: function() { - var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode; + var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode, _ref; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { innerHTML: "
" @@ -7243,7 +7247,7 @@ nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value; QR.max_size_video = (m = Get.scriptData().match(/\bmaxWebmFilesize *= *(\d+)\b/)) ? +m[1] : +nodes.fileInput.max; QR.max_width_video = QR.max_height_video = 2048; - QR.max_duration_video = 120; + QR.max_duration_video = (_ref = g.BOARD.ID) === 'gif' || _ref === 'wsg' ? 300 : 120; if (Conf['Show New Thread Option in Threads']) { $.addClass(QR.nodes.el, 'show-new-thread-option'); } diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 630661849..006fa6ad8 100644 Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js index 5aed4bae2..28152667c 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.9.21.6 +// @version 1.9.21.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.6 +* 4chan X - Version 1.9.21.7 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -396,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.6', + VERSION: '1.9.21.7', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7111,7 +7111,7 @@ } else if (/^video\//.test(file.type)) { video = $.el('video'); $.on(video, 'loadeddata', function() { - var duration, max_height, max_width, pass, videoHeight, videoWidth; + var duration, max_height, max_width, pass, videoHeight, videoWidth, _ref; if (!cb) { return; } @@ -7134,6 +7134,10 @@ QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)"); pass = false; } + if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) { + QR.error("" + file.name + ": Audio not allowed"); + pass = false; + } cb(pass, video); return cb = null; }); @@ -7199,7 +7203,7 @@ return (g.VIEW === 'thread' ? $.addClass : $.rmClass)(QR.nodes.el, 'reply-to-thread'); }, dialog: function() { - var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode; + var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode, _ref; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { innerHTML: " " @@ -7242,7 +7246,7 @@ nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value; QR.max_size_video = (m = Get.scriptData().match(/\bmaxWebmFilesize *= *(\d+)\b/)) ? +m[1] : +nodes.fileInput.max; QR.max_width_video = QR.max_height_video = 2048; - QR.max_duration_video = 120; + QR.max_duration_video = (_ref = g.BOARD.ID) === 'gif' || _ref === 'wsg' ? 300 : 120; if (Conf['Show New Thread Option in Threads']) { $.addClass(QR.nodes.el, 'show-new-thread-option'); } diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 66a128ab2..7a2f9a6bf 100644 Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index e950aae19..584f123e1 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.9.21.6 +// @version 1.9.21.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 913d8efd7..5a28a837f 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.9.21.6 +// @version 1.9.21.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -25,7 +25,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.6 +* 4chan X - Version 1.9.21.7 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -397,7 +397,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.6', + VERSION: '1.9.21.7', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7112,7 +7112,7 @@ } else if (/^video\//.test(file.type)) { video = $.el('video'); $.on(video, 'loadeddata', function() { - var duration, max_height, max_width, pass, videoHeight, videoWidth; + var duration, max_height, max_width, pass, videoHeight, videoWidth, _ref; if (!cb) { return; } @@ -7135,6 +7135,10 @@ QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)"); pass = false; } + if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) { + QR.error("" + file.name + ": Audio not allowed"); + pass = false; + } cb(pass, video); return cb = null; }); @@ -7200,7 +7204,7 @@ return (g.VIEW === 'thread' ? $.addClass : $.rmClass)(QR.nodes.el, 'reply-to-thread'); }, dialog: function() { - var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode; + var dialog, event, i, items, m, match_max, match_min, name, node, nodes, rules, save, setNode, _ref; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top: 50px; right: 0px;', { innerHTML: " " @@ -7243,7 +7247,7 @@ nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value; QR.max_size_video = (m = Get.scriptData().match(/\bmaxWebmFilesize *= *(\d+)\b/)) ? +m[1] : +nodes.fileInput.max; QR.max_width_video = QR.max_height_video = 2048; - QR.max_duration_video = 120; + QR.max_duration_video = (_ref = g.BOARD.ID) === 'gif' || _ref === 'wsg' ? 300 : 120; if (Conf['Show New Thread Option in Threads']) { $.addClass(QR.nodes.el, 'show-new-thread-option'); } diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index fd67bca6b..3c35bd632 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index ac8fd27de..e5d1fac6c 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@