Page 1 of 1

Firefox greasemonkey script for WebUi

Posted: Fri Oct 17, 2008 9:29 pm
by mvoncken
firefox greasemonkey script.

This script will add an icon to any torrent , if you click on the icon you will add the torrent to deluge using the webui.
http://userscripts.org/scripts/show/12639

Comments are welcome.
You can propose new/unsupported trackers.
But they will only be added fast if you can post regular expression match like this:

Code: Select all

   //Gazelle :
   if (url.match(/http:\/\/.*\/torrents\.php\?action\=download/i)) {
       return true;
   }

Re: Firefox greasemonkey script for WebUi

Posted: Thu Oct 30, 2008 3:54 am
by Agent ME
Seems like a really cool useful script - great use of the greasemonkey plugin.
Will it detect anywhere there is a link to a file ending in .torrent?
*tests*
Test (fake) torrent link
Awesome, with the script running it even adds an icon to that link.

Re: Firefox greasemonkey script for WebUi

Posted: Sun May 24, 2009 2:45 am
by Agent ME
Been using this for a while, and here's a small improvement. Changing line 155 from

Code: Select all

if (url.match(/\.torrent$/)) {
to

Code: Select all

if (url.match(/\.torrent((\?|#).*)?$/)) {
allows it to match URLs such as "http://abc/file.torrent?session=555". Not too common, but ran into this at Ubuntu's IPv6 tracker.