Small fix to clickable URLs

Started by ptfrog

ptfrog Lv 1

This is a follow-up to a closed issue:
http://fold.it/portal/node/988174#comment-15967

Thanks for doing this; I know you have made the game much better for many people. I've come across one minor bug, though, and I have one minor suggestion.

The bug:
URLs containing a '#' aren't handled. Example:
http://fold.it/portal/node/991511#comment-15226

The suggestion:
The following URLs are now being made clickable
http://fold.it/*
http://foldit.wikia.com/wiki/*
http://de.foldit.wikia.com/wiki/*
(Reference: http://fold.it/portal/node/988174#comment-15669)

But what about other languages, such as es.foldit.wikia.com? And for that matter, what about other none-wiki links on those sites? The following link, for instance is not handled:
http://foldit.wikia.com/index.php?title=Fold.it_IRC_%28chat%29_Information

I also note that https:// URLs are ignored. For instance,
https://fold.it/portal/node/992270

If you have pattern matching, all this is easy to implement. If not, here is a more complete list of suggested URLs to handle:

Basic site

http://fold.it/*
https://fold.it/*

Main wiki; entire site

http://foldit.wikia.com/*
https://foldit.wikia.com/*

Foreign language wikis

http://??.foldit.wikia.com/*
https://??.foldit.wikia.com/*

The last two require a rudimentary form of pattern matching, though a program might be written to simply ignore those characters.

Thanks!

PS: I have modified the code to urlBot, so that it does not bother to TinyURL any links that are already clickable in the game. (See http://fold.it/portal/node/988174#comment-16597 .) I also corrected a bug that was brought to my attention.

ptfrog Lv 1

Oops – caught by old habit, from the very early days of the web. I often enclose embedded URLs in angle brackets ("less than" and "greater than") because early email programs used this to make it easier to parse them. On blogs, of course, angle brackets make it look like I am entering HTML code, and they are cut out for security.

This is the URL that lists the recent changes to urlBot:
http://fold.it/portal/node/988174#comment-16597
Feedback is welcome.

ptfrog Lv 1

Thanks, Seth! That's what I call "service." :-)

Now the only jobs left for URLbot are foreign URLs and foldit URLs that are embedded in a line of text. As happy as I am with the bot, I love the fact that there is less and less need for it over time.

Thanks once again.