Created
August 18, 2019 20:16
-
-
Save harsh183/6a9a45b3c30d197ec84de5608e489aa6 to your computer and use it in GitHub Desktop.
Userscript to downlaod all links from a given site - use Tampermonkey for Chrome or GreaseMonkey for firefox to run it (just copy paste this code and it should work)
This file contains hidden or 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
// ==UserScript== | |
// @name Download all RHTML links | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// @for any page with annoying .rhtml links | |
const all_links = Array.from(document.getElementsByTagName('a')); | |
const rhtml_links = all_links.filter( link => link.href.endsWith("rhtml") ) | |
rhtml_links.forEach( link => window.open(link.href, "_blank") ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MIT License