Last active
March 19, 2022 17:35
-
-
Save CoolOppo/2a0ffbe582577b1c6f2b 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
// ==UserScript== | |
// @name Sourceforge Instant Downloader | |
// @match *://sourceforge.net/*download* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function exec(fn) { | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'application/javascript'); | |
script.textContent = '(' + fn + ')();'; | |
document.body.appendChild(script); // run the script | |
document.body.removeChild(script); // clean up | |
} | |
exec(function() { | |
var direct_download_link = document.querySelector('#problems > a.direct-download'); | |
window.location = direct_download_link.href; | |
window.setTimeout(function() { | |
history.go(-1); | |
}, 500); | |
}); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mozilla Firefox 98.0b2 (64-bit), Tampermonkey 4.13.6136 (1 May 2021) — script not working.