Skip to content

Instantly share code, notes, and snippets.

@CoolOppo
Last active March 19, 2022 17:35
Show Gist options
  • Save CoolOppo/2a0ffbe582577b1c6f2b to your computer and use it in GitHub Desktop.
Save CoolOppo/2a0ffbe582577b1c6f2b to your computer and use it in GitHub Desktop.
// ==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);
});
}());
@Korb
Copy link

Korb commented Feb 10, 2022

Mozilla Firefox 98.0b2 (64-bit), Tampermonkey 4.13.6136 (1 May 2021) — script not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment