Firefox greasemonkey script for WebUi

Suggest, post, or discuss plugins for Deluge
Post Reply
mvoncken
Developer
Developer
Posts: 225
Joined: Mon Sep 03, 2007 9:38 pm

Firefox greasemonkey script for WebUi

Post 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;
   }
dev: webui, core, labels | irc:vonck7 |
Agent ME
New User
New User
Posts: 5
Joined: Thu Oct 30, 2008 1:41 am

Re: Firefox greasemonkey script for WebUi

Post 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.
Agent ME
New User
New User
Posts: 5
Joined: Thu Oct 30, 2008 1:41 am

Re: Firefox greasemonkey script for WebUi

Post 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.
Post Reply