Merge branch 'bstable'
Conflicts: src/Images/ImageExpand.coffee
This commit is contained in:
commit
8a02642d01
@ -3,6 +3,11 @@ 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).
|
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.x -->
|
<!-- v1.9.21.x -->
|
||||||
|
### v1.9.21.8
|
||||||
|
*2015-01-31* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.21.8/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
|
||||||
|
- Expanded WebMs with audio are no longer paused when offscreen.
|
||||||
|
|
||||||
### v1.9.21.7
|
### 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")]
|
*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")]
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.21.7
|
* 4chan X - Version 1.9.21.8
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.9.21.7
|
// @version 1.9.21.8
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.9.21.7
|
// @version 1.9.21.8
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -25,7 +25,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.21.7
|
* 4chan X - Version 1.9.21.8
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -397,7 +397,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.21.7',
|
VERSION: '1.9.21.8',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -831,6 +831,10 @@
|
|||||||
return (value < min ? min : value > max ? max : value);
|
return (value < min ? min : value > max ? max : value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.hasAudio = function(video) {
|
||||||
|
return video.mozHasAudio || !!video.webkitAudioDecodedByteCount;
|
||||||
|
};
|
||||||
|
|
||||||
$.item = function(key, val) {
|
$.item = function(key, val) {
|
||||||
var item;
|
var item;
|
||||||
item = {};
|
item = {};
|
||||||
@ -6627,7 +6631,7 @@
|
|||||||
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
||||||
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
sc = $.el('a', {
|
this.shortcut = sc = $.el('a', {
|
||||||
className: 'qr-shortcut fa fa-comment-o disabled',
|
className: 'qr-shortcut fa fa-comment-o disabled',
|
||||||
textContent: 'QR',
|
textContent: 'QR',
|
||||||
title: 'Quick Reply',
|
title: 'Quick Reply',
|
||||||
@ -6747,7 +6751,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
return $.rmClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
@ -6761,7 +6765,7 @@
|
|||||||
d.activeElement.blur();
|
d.activeElement.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
$.addClass($('.qr-shortcut'), 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
||||||
@ -7135,7 +7139,7 @@
|
|||||||
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) {
|
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && $.hasAudio(video)) {
|
||||||
QR.error("" + file.name + ": Audio not allowed");
|
QR.error("" + file.name + ": Audio not allowed");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
@ -9519,6 +9523,9 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
video = post.file.fullImage;
|
video = post.file.fullImage;
|
||||||
|
if ($.hasAudio(video)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
visible = Header.isNodeVisible(video);
|
visible = Header.isNodeVisible(video);
|
||||||
if (visible && post.file.wasPlaying) {
|
if (visible && post.file.wasPlaying) {
|
||||||
delete post.file.wasPlaying;
|
delete post.file.wasPlaying;
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.21.7
|
// @version 1.9.21.8
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.21.7
|
* 4chan X - Version 1.9.21.8
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -396,7 +396,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.21.7',
|
VERSION: '1.9.21.8',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -830,6 +830,10 @@
|
|||||||
return (value < min ? min : value > max ? max : value);
|
return (value < min ? min : value > max ? max : value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.hasAudio = function(video) {
|
||||||
|
return video.mozHasAudio || !!video.webkitAudioDecodedByteCount;
|
||||||
|
};
|
||||||
|
|
||||||
$.item = function(key, val) {
|
$.item = function(key, val) {
|
||||||
var item;
|
var item;
|
||||||
item = {};
|
item = {};
|
||||||
@ -6626,7 +6630,7 @@
|
|||||||
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
||||||
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
sc = $.el('a', {
|
this.shortcut = sc = $.el('a', {
|
||||||
className: 'qr-shortcut fa fa-comment-o disabled',
|
className: 'qr-shortcut fa fa-comment-o disabled',
|
||||||
textContent: 'QR',
|
textContent: 'QR',
|
||||||
title: 'Quick Reply',
|
title: 'Quick Reply',
|
||||||
@ -6746,7 +6750,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
return $.rmClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
@ -6760,7 +6764,7 @@
|
|||||||
d.activeElement.blur();
|
d.activeElement.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
$.addClass($('.qr-shortcut'), 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
||||||
@ -7134,7 +7138,7 @@
|
|||||||
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) {
|
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && $.hasAudio(video)) {
|
||||||
QR.error("" + file.name + ": Audio not allowed");
|
QR.error("" + file.name + ": Audio not allowed");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
@ -9518,6 +9522,9 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
video = post.file.fullImage;
|
video = post.file.fullImage;
|
||||||
|
if ($.hasAudio(video)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
visible = Header.isNodeVisible(video);
|
visible = Header.isNodeVisible(video);
|
||||||
if (visible && post.file.wasPlaying) {
|
if (visible && post.file.wasPlaying) {
|
||||||
delete post.file.wasPlaying;
|
delete post.file.wasPlaying;
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.21.7
|
// @version 1.9.21.8
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.21.7
|
// @version 1.9.21.8
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -25,7 +25,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.21.7
|
* 4chan X - Version 1.9.21.8
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -397,7 +397,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.21.7',
|
VERSION: '1.9.21.8',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -831,6 +831,10 @@
|
|||||||
return (value < min ? min : value > max ? max : value);
|
return (value < min ? min : value > max ? max : value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$.hasAudio = function(video) {
|
||||||
|
return video.mozHasAudio || !!video.webkitAudioDecodedByteCount;
|
||||||
|
};
|
||||||
|
|
||||||
$.item = function(key, val) {
|
$.item = function(key, val) {
|
||||||
var item;
|
var item;
|
||||||
item = {};
|
item = {};
|
||||||
@ -6627,7 +6631,7 @@
|
|||||||
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
noscript = Conf['Force Noscript Captcha'] || !doc.dataset.jsEnabled;
|
||||||
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
this.captcha = Captcha[noscript ? 'noscript' : 'v2'];
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
sc = $.el('a', {
|
this.shortcut = sc = $.el('a', {
|
||||||
className: 'qr-shortcut fa fa-comment-o disabled',
|
className: 'qr-shortcut fa fa-comment-o disabled',
|
||||||
textContent: 'QR',
|
textContent: 'QR',
|
||||||
title: 'Quick Reply',
|
title: 'Quick Reply',
|
||||||
@ -6747,7 +6751,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
return $.rmClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
@ -6761,7 +6765,7 @@
|
|||||||
d.activeElement.blur();
|
d.activeElement.blur();
|
||||||
$.rmClass(QR.nodes.el, 'dump');
|
$.rmClass(QR.nodes.el, 'dump');
|
||||||
if (Conf['QR Shortcut']) {
|
if (Conf['QR Shortcut']) {
|
||||||
$.addClass($('.qr-shortcut'), 'disabled');
|
$.addClass(QR.shortcut, 'disabled');
|
||||||
}
|
}
|
||||||
new QR.post(true);
|
new QR.post(true);
|
||||||
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
_ref = QR.posts.splice(0, QR.posts.length - 1);
|
||||||
@ -7135,7 +7139,7 @@
|
|||||||
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
QR.error("" + file.name + ": Video too long (video: " + duration + "s, max: " + QR.max_duration_video + "s)");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && (video.mozHasAudio || video.webkitAudioDecodedByteCount)) {
|
if (((_ref = g.BOARD.ID) !== 'gif' && _ref !== 'wsg') && $.hasAudio(video)) {
|
||||||
QR.error("" + file.name + ": Audio not allowed");
|
QR.error("" + file.name + ": Audio not allowed");
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
@ -9519,6 +9523,9 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
video = post.file.fullImage;
|
video = post.file.fullImage;
|
||||||
|
if ($.hasAudio(video)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
visible = Header.isNodeVisible(video);
|
visible = Header.isNodeVisible(video);
|
||||||
if (visible && post.file.wasPlaying) {
|
if (visible && post.file.wasPlaying) {
|
||||||
delete post.file.wasPlaying;
|
delete post.file.wasPlaying;
|
||||||
|
|||||||
Binary file not shown.
@ -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://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.21.7' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.21.8' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -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://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.21.7' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.21.8' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.9.21.7",
|
"version": "1.9.21.8",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
@ -296,6 +296,9 @@ $.minmax = (value, min, max) ->
|
|||||||
value
|
value
|
||||||
)
|
)
|
||||||
|
|
||||||
|
$.hasAudio = (video) ->
|
||||||
|
video.mozHasAudio or !!video.webkitAudioDecodedByteCount
|
||||||
|
|
||||||
$.item = (key, val) ->
|
$.item = (key, val) ->
|
||||||
item = {}
|
item = {}
|
||||||
item[key] = val
|
item[key] = val
|
||||||
|
|||||||
@ -79,6 +79,8 @@ ImageExpand =
|
|||||||
continue unless file and file.isVideo and file.isExpanded
|
continue unless file and file.isVideo and file.isExpanded
|
||||||
|
|
||||||
video = file.fullImage
|
video = file.fullImage
|
||||||
|
continue if $.hasAudio video
|
||||||
|
|
||||||
visible = Header.isNodeVisible video
|
visible = Header.isNodeVisible video
|
||||||
if visible and file.wasPlaying
|
if visible and file.wasPlaying
|
||||||
delete file.wasPlaying
|
delete file.wasPlaying
|
||||||
|
|||||||
@ -14,7 +14,7 @@ QR =
|
|||||||
@captcha = Captcha[if noscript then 'noscript' else 'v2']
|
@captcha = Captcha[if noscript then 'noscript' else 'v2']
|
||||||
|
|
||||||
if Conf['QR Shortcut']
|
if Conf['QR Shortcut']
|
||||||
sc = $.el 'a',
|
@shortcut = sc = $.el 'a',
|
||||||
className: 'qr-shortcut fa fa-comment-o disabled'
|
className: 'qr-shortcut fa fa-comment-o disabled'
|
||||||
textContent: 'QR'
|
textContent: 'QR'
|
||||||
title: 'Quick Reply'
|
title: 'Quick Reply'
|
||||||
@ -112,7 +112,7 @@ QR =
|
|||||||
error: err
|
error: err
|
||||||
return
|
return
|
||||||
if Conf['QR Shortcut']
|
if Conf['QR Shortcut']
|
||||||
$.rmClass $('.qr-shortcut'), 'disabled'
|
$.rmClass QR.shortcut, 'disabled'
|
||||||
|
|
||||||
close: ->
|
close: ->
|
||||||
if QR.req
|
if QR.req
|
||||||
@ -123,7 +123,7 @@ QR =
|
|||||||
d.activeElement.blur()
|
d.activeElement.blur()
|
||||||
$.rmClass QR.nodes.el, 'dump'
|
$.rmClass QR.nodes.el, 'dump'
|
||||||
if Conf['QR Shortcut']
|
if Conf['QR Shortcut']
|
||||||
$.addClass $('.qr-shortcut'), 'disabled'
|
$.addClass QR.shortcut, 'disabled'
|
||||||
new QR.post true
|
new QR.post true
|
||||||
for post in QR.posts.splice 0, QR.posts.length - 1
|
for post in QR.posts.splice 0, QR.posts.length - 1
|
||||||
post.delete()
|
post.delete()
|
||||||
@ -404,7 +404,7 @@ QR =
|
|||||||
else if duration > QR.max_duration_video
|
else if duration > QR.max_duration_video
|
||||||
QR.error "#{file.name}: Video too long (video: #{duration}s, max: #{QR.max_duration_video}s)"
|
QR.error "#{file.name}: Video too long (video: #{duration}s, max: #{QR.max_duration_video}s)"
|
||||||
pass = false
|
pass = false
|
||||||
if g.BOARD.ID not in ['gif', 'wsg'] and (video.mozHasAudio or video.webkitAudioDecodedByteCount)
|
if g.BOARD.ID not in ['gif', 'wsg'] and $.hasAudio video
|
||||||
QR.error "#{file.name}: Audio not allowed"
|
QR.error "#{file.name}: Audio not allowed"
|
||||||
pass = false
|
pass = false
|
||||||
cb pass, video
|
cb pass, video
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user