Created
May 8, 2022 16:14
-
-
Save Firsh/cd60a53aed6bd0d819e19d8835aff721 to your computer and use it in GitHub Desktop.
Userscript to force download from links to PDF files
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
// ==UserScript== | |
// @name PDF download | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://thefalconmethod.com/* | |
// @match https://www.oaktreecapital.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelectorAll('a[href*=".pdf"]').forEach(el => {el.setAttribute('download','')}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment