diff --git a/CHANGELOG.md b/CHANGELOG.md index be18e7679..da01e6fa5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ 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.4 +*2015-01-30* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.4/builds/4chan-X-noupdate.crx "Chromium version")] + +Posting WebMs with sound has recently been enabled, at least on /wsg/. + +- Restore `Allow Sound` option. +- Fix sound playing from replaced WebM thumbnails. +- Remove check for sound before posting. + ### v1.9.21.3 *2015-01-28* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.3/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/LICENSE b/LICENSE index 2a888d30b..ba74890af 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.9.21.3 +* 4chan X - Version 1.9.21.4 * * 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 178399642..4e1ac39c7 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 eb440b897..2dac8ae8c 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.3 +// @version 1.9.21.4 // @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 dfc39d36c..ddae254c7 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.3 +// @version 1.9.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -25,7 +25,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.3 +* 4chan X - Version 1.9.21.4 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -196,6 +196,7 @@ 'Autoplay': [true, 'Videos begin playing immediately when opened.'], 'Restart when Opened': [true, 'Restart GIFs and WebMs when you hover over or expand them.'], 'Show Controls': [true, 'Show controls on videos expanded inline.'], + 'Allow Sound': [true, 'Allow sound in videos.'], 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.'] }, 'Menu': { @@ -396,7 +397,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.3', + VERSION: '1.9.21.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7131,10 +7132,6 @@ 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; }); @@ -9030,6 +9027,7 @@ $.replace(nodes.current, file); if (elType === 'video') { file.loop = true; + file.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { file.play(); } @@ -9630,6 +9628,7 @@ thumb.parentNode.removeAttribute('href'); thumb.parentNode.removeAttribute('target'); el.loop = true; + el.muted = !Conf['Allow Sound']; } if (!isVideo) { return $.asap((function() { @@ -9823,6 +9822,7 @@ if (isVideo) { el.loop = true; el.controls = false; + el.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { el.play(); } @@ -9948,6 +9948,7 @@ video = $.el('video', { preload: 'none', loop: true, + muted: true, poster: thumb.src, textContent: thumb.alt, className: thumb.className diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 04b422a8f..d3d3959a4 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 8729c1e24..3ca24d69d 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.3 +// @version 1.9.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.3 +* 4chan X - Version 1.9.21.4 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -195,6 +195,7 @@ 'Autoplay': [true, 'Videos begin playing immediately when opened.'], 'Restart when Opened': [true, 'Restart GIFs and WebMs when you hover over or expand them.'], 'Show Controls': [true, 'Show controls on videos expanded inline.'], + 'Allow Sound': [true, 'Allow sound in videos.'], 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.'] }, 'Menu': { @@ -395,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.3', + VERSION: '1.9.21.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7130,10 +7131,6 @@ 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; }); @@ -9029,6 +9026,7 @@ $.replace(nodes.current, file); if (elType === 'video') { file.loop = true; + file.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { file.play(); } @@ -9629,6 +9627,7 @@ thumb.parentNode.removeAttribute('href'); thumb.parentNode.removeAttribute('target'); el.loop = true; + el.muted = !Conf['Allow Sound']; } if (!isVideo) { return $.asap((function() { @@ -9822,6 +9821,7 @@ if (isVideo) { el.loop = true; el.controls = false; + el.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { el.play(); } @@ -9947,6 +9947,7 @@ video = $.el('video', { preload: 'none', loop: true, + muted: true, poster: thumb.src, textContent: thumb.alt, className: thumb.className diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 8191a8079..19b27ce95 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 31b578788..875d89178 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.3 +// @version 1.9.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 5fc0ea057..be00902b5 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.3 +// @version 1.9.21.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -25,7 +25,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.9.21.3 +* 4chan X - Version 1.9.21.4 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -196,6 +196,7 @@ 'Autoplay': [true, 'Videos begin playing immediately when opened.'], 'Restart when Opened': [true, 'Restart GIFs and WebMs when you hover over or expand them.'], 'Show Controls': [true, 'Show controls on videos expanded inline.'], + 'Allow Sound': [true, 'Allow sound in videos.'], 'Loop in New Tab': [true, 'Loop videos opened in their own tabs.'] }, 'Menu': { @@ -396,7 +397,7 @@ doc = d.documentElement; g = { - VERSION: '1.9.21.3', + VERSION: '1.9.21.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -7131,10 +7132,6 @@ 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; }); @@ -9030,6 +9027,7 @@ $.replace(nodes.current, file); if (elType === 'video') { file.loop = true; + file.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { file.play(); } @@ -9630,6 +9628,7 @@ thumb.parentNode.removeAttribute('href'); thumb.parentNode.removeAttribute('target'); el.loop = true; + el.muted = !Conf['Allow Sound']; } if (!isVideo) { return $.asap((function() { @@ -9823,6 +9822,7 @@ if (isVideo) { el.loop = true; el.controls = false; + el.muted = !Conf['Allow Sound']; if (Conf['Autoplay']) { el.play(); } @@ -9948,6 +9948,7 @@ video = $.el('video', { preload: 'none', loop: true, + muted: true, poster: thumb.src, textContent: thumb.alt, className: thumb.className diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 1fa2fe322..e4fd3ded3 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 af3a23ad8..b0829c502 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index dc3f0c5c2..b5d93a416 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index 0e47450d0..eb00d19cf 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", - "version": "1.9.21.3", + "version": "1.9.21.4", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",