add google translate endpoint

This commit is contained in:
Ashley 2024-01-09 20:09:34 +00:00
parent 636a0daf31
commit 8259e6afda

View file

@ -290,10 +290,8 @@ function fetchUrls(urls) {
video.addEventListener("contextmenu", function(event) { video.addEventListener("contextmenu", function(event) {
// Check if the video is in fullscreen mode // Check if the video is in fullscreen mode
if (!document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement) { if (!document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullScreenElement && !document.msFullscreenElement) {
// The video is not in fullscreen mode, prevent the default behavior
event.preventDefault(); event.preventDefault();
// Your additional context menu logic
popupMenu.style.display = "block"; popupMenu.style.display = "block";
popupMenu.style.left = event.pageX + "px"; popupMenu.style.left = event.pageX + "px";
popupMenu.style.top = event.pageY + "px"; popupMenu.style.top = event.pageY + "px";
@ -356,4 +354,6 @@ video.addEventListener("contextmenu", function(event) {
return 2; return 2;
} }
} }
const GoogleTranslateEndpoint = "https://translate.google.com/_/TranslateWebserverUi/data/batchexecute?rpcids=MkEWBc&rt=c"
// @license-end // @license-end