Created
October 18, 2011 20:39
-
-
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.
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
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