Page 1 of 1

Add to Transmission Greasemonkey Script

Posted: Thu Feb 11, 2010 8:32 pm
by hmphargh
Hi guys,

I'm pretty new to Transmission, but when I couldn't find any Greasemonkey scripts that would allow me to add torrent files directly, I decided to whip one up. It is hosted at userscripts.org. [s]As of right now, it only adds links that end in .torrent, meaning some torrent sites won't work[/s].

I will continue to work on this project, and if any JS gurus out there are interested in contributing, drop me a PM.

On to the good stuff, here is the link: http://userscripts.org/scripts/show/68700. Let me know what you think and if you have any comments. The script was tested predominantly on firefox 3.6, so if you are having trouble making it work, you might try that combination to see if it is on your end or mine.

Lastly, a short description of the UI. Right now, when you go to a site that has .torrent files on the page, it will gray out the links that are not .torrent files. If you want to view them, you simply have to click on the link and say that you want to open the page locally. I look forward to your comments and suggestions.

John

UPDATE: If anyone tried the script and it didn't work, please download it again, I had a bug that was causing the script to say that all torrents were invalid.

UPDATE 2: I have added several sites to the script. Now for the bad news: I have intentionally left some sites out, namely, torrentdownloads, torrage, and btmon, unfortunately they use tricks that prevent me from sending the torrent file to Transmission remotely.

Re: Add to Transmission Greasemonkey Script

Posted: Tue Feb 16, 2010 1:29 pm
by ingensin
Like the idea, but I can't make it to work for me.

I have edited the script so that it points to where my transmission is.

When I click on a torrent it ask me "open" os "save".

BTW, I'm running on a NAS (linux)

Please help.

Re: Add to Transmission Greasemonkey Script

Posted: Tue Feb 16, 2010 2:18 pm
by hmphargh
If you feel comfortable with it and are able to make it open to the web, that would probably be the easiest way for me to help you debug it. Send me a PM with a good way to contact you (instant message clients are probably best, I have AIM and GChat) and I'll try to help you get it working.

Re: Add to Transmission Greasemonkey Script

Posted: Wed Feb 17, 2010 9:13 pm
by bluey
It would be great to see this converted into a Google Chrome Extension. Afaik it should run as it is but i couldn't make it work.

Chrome

Posted: Wed Feb 17, 2010 10:48 pm
by hmphargh
I'll take a look at it and report back. If you are a programmer, feel free to take a poke at it, my code is nothing sacred.

Re: Add to Transmission Greasemonkey Script

Posted: Thu Feb 18, 2010 7:49 pm
by hmphargh
I've looked into it, and I probably won't be making this into a Chrome extension any time soon. The reason is that GreaseMonkey and Chrome handle cross-origin XHR in very different ways. I may look into it again in the future, and would encourage anyone who is interested in porting to Chrome to do so.

Re: Add to Transmission Greasemonkey Script

Posted: Fri Feb 19, 2010 5:23 am
by hmphargh
Sorry guys, I lied, I went ahead and did it. I've published it here: https://chrome.google.com/extensions/de ... kolkmkefke

Initially, you will be asked to store your server's host, port, directory, username, and password. If you need to reset your information, hold alt+shift and click on a torrent file, you will be automatically prompted to re-enter your information.

After that, once you are on a page that contains links to torrent files, all the links that are not torrent files will be slightly grayed out. If you hold down control and click, the link will open locally in a new tab.

Again, feel free to give me feedback, and most importantly, enjoy.