Allow drag left even when controls are off
Will be helpful if someone activates controls by right-clicking.
This commit is contained in:
parent
98514dd986
commit
ddf202397c
@ -7788,6 +7788,12 @@
|
|||||||
file.thumb.parentNode.removeAttribute('target');
|
file.thumb.parentNode.removeAttribute('target');
|
||||||
video.muted = !Conf['Allow Sound'];
|
video.muted = !Conf['Allow Sound'];
|
||||||
video.controls = Conf['Show Controls'];
|
video.controls = Conf['Show Controls'];
|
||||||
|
video.dataset.mousedown = 'false';
|
||||||
|
_ref = ImageExpand.videoCB;
|
||||||
|
for (eventName in _ref) {
|
||||||
|
cb = _ref[eventName];
|
||||||
|
$.on(video, eventName, cb);
|
||||||
|
}
|
||||||
if (Conf['Show Controls']) {
|
if (Conf['Show Controls']) {
|
||||||
contract = $.el('a', {
|
contract = $.el('a', {
|
||||||
textContent: 'contract',
|
textContent: 'contract',
|
||||||
@ -7798,12 +7804,6 @@
|
|||||||
return ImageExpand.contract(post);
|
return ImageExpand.contract(post);
|
||||||
});
|
});
|
||||||
file.videoControls.push($.tn('\u00A0'), contract);
|
file.videoControls.push($.tn('\u00A0'), contract);
|
||||||
video.dataset.mousedown = 'false';
|
|
||||||
_ref = ImageExpand.videoCB;
|
|
||||||
for (eventName in _ref) {
|
|
||||||
cb = _ref[eventName];
|
|
||||||
$.on(video, eventName, cb);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (Conf['Autoplay']) {
|
if (Conf['Autoplay']) {
|
||||||
video.controls = false;
|
video.controls = false;
|
||||||
|
|||||||
@ -7807,6 +7807,12 @@
|
|||||||
file.thumb.parentNode.removeAttribute('target');
|
file.thumb.parentNode.removeAttribute('target');
|
||||||
video.muted = !Conf['Allow Sound'];
|
video.muted = !Conf['Allow Sound'];
|
||||||
video.controls = Conf['Show Controls'];
|
video.controls = Conf['Show Controls'];
|
||||||
|
video.dataset.mousedown = 'false';
|
||||||
|
_ref = ImageExpand.videoCB;
|
||||||
|
for (eventName in _ref) {
|
||||||
|
cb = _ref[eventName];
|
||||||
|
$.on(video, eventName, cb);
|
||||||
|
}
|
||||||
if (Conf['Show Controls']) {
|
if (Conf['Show Controls']) {
|
||||||
contract = $.el('a', {
|
contract = $.el('a', {
|
||||||
textContent: 'contract',
|
textContent: 'contract',
|
||||||
@ -7817,12 +7823,6 @@
|
|||||||
return ImageExpand.contract(post);
|
return ImageExpand.contract(post);
|
||||||
});
|
});
|
||||||
file.videoControls.push($.tn('\u00A0'), contract);
|
file.videoControls.push($.tn('\u00A0'), contract);
|
||||||
video.dataset.mousedown = 'false';
|
|
||||||
_ref = ImageExpand.videoCB;
|
|
||||||
for (eventName in _ref) {
|
|
||||||
cb = _ref[eventName];
|
|
||||||
$.on(video, eventName, cb);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (Conf['Autoplay']) {
|
if (Conf['Autoplay']) {
|
||||||
video.controls = false;
|
video.controls = false;
|
||||||
|
|||||||
@ -157,6 +157,9 @@ ImageExpand =
|
|||||||
file.thumb.parentNode.removeAttribute 'target'
|
file.thumb.parentNode.removeAttribute 'target'
|
||||||
video.muted = !Conf['Allow Sound']
|
video.muted = !Conf['Allow Sound']
|
||||||
video.controls = Conf['Show Controls']
|
video.controls = Conf['Show Controls']
|
||||||
|
# drag left to contract
|
||||||
|
video.dataset.mousedown = 'false'
|
||||||
|
$.on video, eventName, cb for eventName, cb of ImageExpand.videoCB
|
||||||
if Conf['Show Controls']
|
if Conf['Show Controls']
|
||||||
# contract link in file info
|
# contract link in file info
|
||||||
contract = $.el 'a',
|
contract = $.el 'a',
|
||||||
@ -165,10 +168,6 @@ ImageExpand =
|
|||||||
title: 'You can also contract the video by dragging it to the left.'
|
title: 'You can also contract the video by dragging it to the left.'
|
||||||
$.on contract, 'click', (e) -> ImageExpand.contract post
|
$.on contract, 'click', (e) -> ImageExpand.contract post
|
||||||
file.videoControls.push $.tn('\u00A0'), contract
|
file.videoControls.push $.tn('\u00A0'), contract
|
||||||
# drag left to contract
|
|
||||||
video.dataset.mousedown = 'false'
|
|
||||||
for eventName, cb of ImageExpand.videoCB
|
|
||||||
$.on video, eventName, cb
|
|
||||||
if Conf['Autoplay']
|
if Conf['Autoplay']
|
||||||
video.controls = false
|
video.controls = false
|
||||||
video.play()
|
video.play()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user