Created
December 10, 2024 02:50
-
-
Save fastfingertips/70b77bd8ae19ec307d1c57095e2f6311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
// Extract videoId and videoType from the current page's script tags | |
var videoId = window.videoId || (document.querySelector("script")?.textContent.match(/var videoId = '(\d+)'/) || [])[1]; | |
var videoType = window.videoType || (document.querySelector("script")?.textContent.match(/var videoType = '(\w+)'/) || [])[1]; | |
// Get the current site domain | |
var siteDomain = window.location.origin; | |
// If both videoId and videoType are found, open the URL in a new tab | |
if (videoId && videoType) { | |
window.open(`${siteDomain}/get-source?movie_id=${videoId}&type=${videoType}`, "_blank"); | |
} else { | |
// Show an alert if necessary data is missing | |
alert("Required information not found! Missing Video ID or Video Type."); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment