Skip to content

Instantly share code, notes, and snippets.

@jl2
Created October 18, 2011 20:39
Show Gist options
  • Save jl2/1296649 to your computer and use it in GitHub Desktop.
Save jl2/1296649 to your computer and use it in GitHub Desktop.
Opera user javascript to remove the stupid time delay on SourceForge downloads and start downloading immediately.
if (location.hostname.indexOf('sourceforge.net') != -1) {
window.opera.addEventListener('BeforeScript', function (e) {
e.preventDefault();
}, false);
window.opera.addEventListener('BeforeEvent.load', function (e)
{
if (e.event.target instanceof Document)
{
e.preventDefault();
var nodes = e.event.target.getElementsByClassName('direct-download');
window.location = nodes[0].getAttribute("href");
}
}, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment