Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Internet Gambling (http://archives2.twoplustwo.com/forumdisplay.php?f=26)
-   -   Automatic clean-up of long URL text (http://archives2.twoplustwo.com/showthread.php?t=200807)

StevieG 02-22-2005 05:54 PM

Automatic clean-up of long URL text
 
Annoyed when a user posts a long URL that causes the page to scroll out to the right?

If you use Firefox, and are not afraid of installing some extensions, then you no longer have to see that on 2+2.

I have a user script for you that will rename excessively long URLs to stop them from making you scroll horizontally to read the rest of the messages or messages on the same page. It will not stop you from seeing Angry Cola's "use clean links" rants.

How to install:

1. The rename user script requires Firefox to have the Grease Monkey extension. Grease Monkey is available at mozdev.org.

2. Once you have that installed you will need to exit Firefox and relaunch the application for the extension to be installed.

3. Right click the rename long URL link here and choose the "Install User Script..." option from the context sensitive menu.

4. Browse 2+2 and try it out.

5. PM me with bugs and suggestions.

Notes:

First, the replacement happens after the page is loaded, so you may notice a delay, and you may see the page refresh. This refresh won't happen unless a replacement is made.

Also, it's pretty dumb right now, in that it will only rename the text to (renamed long text) and it will only do this in the case of URLs that have no white space whatsoever, and are at least 81 characters long. That '81' magic number is fixed (no variables allowed in these user scripts).

The no white space requirement means if someone posts a link as "see http://really.long.ass.url" then that little bit of whitespace between "see" and the long ass URL will prevent the replacement from happening. But, hey, if they put in different text for the link than the URL itself, chances are it does not need to be cleaned up.

Lastly, this will not resize images that cause scrolling.

Alobar 02-27-2005 11:12 PM

Re: Automatic clean-up of long URL text
 
neet, thanx!

zerosum 06-04-2005 10:37 AM

Re: Automatic clean-up of long URL text
 
If you don't want to mess with greasemonky, you can use the greasemonkey compiler -- see link below -- to convert the script into a full-fledged Firefox extension.

http://www.letitblog.com/greasemonkey-compiler/

cold_cash 06-06-2005 03:07 PM

Re: Automatic clean-up of long URL text
 
This didn't work for me. I've got it installed and enabled, but the long links still expand my screen for miles and I have to use horizontal scroll bar. I hate that.


All times are GMT -4. The time now is 01:50 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.