mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 18:57:51 +01:00
dont show the custom popup when fullscreen
This commit is contained in:
parent
bd5bbeb374
commit
4df6463506
1 changed files with 13 additions and 6 deletions
19
css/app.js
19
css/app.js
|
@ -285,14 +285,21 @@ function fetchUrls(urls) {
|
||||||
var popupMenu = document.getElementById("popupMenu");
|
var popupMenu = document.getElementById("popupMenu");
|
||||||
var loopOption = document.getElementById("loopOption");
|
var loopOption = document.getElementById("loopOption");
|
||||||
var speedOption = document.getElementById("speedOption");
|
var speedOption = document.getElementById("speedOption");
|
||||||
|
|
||||||
|
|
||||||
video.addEventListener("contextmenu", function(event) {
|
video.addEventListener("contextmenu", function(event) {
|
||||||
event.preventDefault();
|
// Check if the video is in fullscreen mode
|
||||||
|
if (!document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement) {
|
||||||
|
// The video is not in fullscreen mode, prevent the default behavior
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
// Your additional context menu logic
|
||||||
|
popupMenu.style.display = "block";
|
||||||
|
popupMenu.style.left = event.pageX + "px";
|
||||||
|
popupMenu.style.top = event.pageY + "px";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
popupMenu.style.display = "block";
|
|
||||||
popupMenu.style.left = event.pageX + "px";
|
|
||||||
popupMenu.style.top = event.pageY + "px";
|
|
||||||
});
|
|
||||||
|
|
||||||
// Hide the popup menu when clicking outside of it
|
// Hide the popup menu when clicking outside of it
|
||||||
window.addEventListener("click", function(event) {
|
window.addEventListener("click", function(event) {
|
||||||
|
|
Loading…
Reference in a new issue