Copy filename to clipboard by clicking the video info tag
Clicking on the video info has the annoying action of playing the video. Right-click to 'save-as' does not use the correct filename too. Since the user probably has to copy the video title first, I now make it easy to do so -- just click on the video info tag. It will flash to indicate the title is copied.
720p/MP4 is exempted as clicking it will download the video.
The Edge browser is also exempted as it honors the download attribute for cross-origin resource and prompts to download with the correct filename.
Two new features in v2: persistent user settings and copy filename to clipboard
Support persistent user settings
This is a long-requested feature. It is now possible to persist settings without editing the script, but there is still no UI.
What you need to do:
localStorage["ujsYtLinks.cfg."] =
Example:
localStorage["ujsYtLinks.cfg.showVideoFormats"] = false
For strings, you need to quote it twice:
localStorage["ujsYtLinks.cfg.showVideoFormats"] = '"btn"'
Delete the setting to get back the original behavior:
localStorage.removeItem("ujsYtLinks.cfg.")
Example:
localStorage.removeItem("ujsYtLinks.cfg.showVideoFormats")
Settings are listed in the main page.
Copy filename to clipboard by clicking the video info tag
Clicking on the video info has the annoying action of playing the video. Right-click to 'save-as' does not use the correct filename too. Since the user probably has to copy the video title first, I now make it easy to do so -- just click on the video info tag. It will flash to indicate the title is copied.
720p/MP4 is exempted as clicking it will download the video.
The Edge browser is also exempted as it honors the download attribute for cross-origin resource and prompts to download with the correct filename.