sbussetti / deluge-siphon

A Chrome extension for sending torrents to your Deluge server.
http://sbussetti.github.io/deluge-siphon/
82 stars 22 forks source link

Changed default regex #3

Closed petereichinger closed 11 years ago

petereichinger commented 11 years ago

Changed the regex so it matches when .torrent is at the end of the string

L422Y commented 11 years ago

I don't know how good of an idea this is, I suppose it comes down to preference, because a lot of sites add GET data to the end of a link so .torrent isn't always the last string of characters in a URL

sbussetti commented 11 years ago

I agree. However both regexes had issues. The less restrictive version would make sites like www.torrentday.com trigger "add torent" on every link on the site though.

I just submitted 0153b1f6692caf04ea768cc77de2a85a95775252 that should account for both cases without being too open ended.

The reality is that there's never going to be a perfect regex for this, so it's going to evolve as we find more cases.