Skip to content

Instantly share code, notes, and snippets.

@KingCprey
Last active July 20, 2020 17:31
Show Gist options
  • Save KingCprey/d27f7ed6beaea36d185d3cc3e7466d73 to your computer and use it in GitHub Desktop.
Save KingCprey/d27f7ed6beaea36d185d3cc3e7466d73 to your computer and use it in GitHub Desktop.
Vodlocker Download File Bookmarklet
//Create a bookmark, paste this as the url (tested on Chrome, not sure about other browsers)
javascript: (function() {var telem = document.getElementById("file_title");var videlems = document.getElementsByName("videourl");var velem = videlems.length > 0 ? videlems[0] : null;if (velem == null) {alert("videourl element does not exist yet");} else {var title = "v.mp4";if (telem == null) {title = document.title.substring(6);} else {title = telem.innerText.replace("Background Audio?", "").replace("Close X", "").trim();}var newa = document.createElement("a");newa.setAttribute("href", velem.getAttribute("value").replace("v.mp4", title + ".mp4"));newa.setAttribute("target","_blank");newa.click();}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment