Force Wrap

By LouCypher Last update Sep 29, 2005 — Installed 4,231 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 15 posts, 11 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
znerp Scriptwright

Whenever I try to send an email using Hotmail, I always have to change the box to plain text as the rich text wouldn't allow me to type anything in the message body. Recently however (with the changes Hotmail have made), the plain text also won't allow me to type anything. Long story short, it turned out that this script was the problem.

Adding http://*mail.live.com/* to the excludes has sorted this out for me.

 
RNiK Scriptwright

Doesn't seem to work on SourceForce.

Example: http://sourceforge.net/project/shownotes.php?gr...

 
Batshua User

This script seems to be breaking Gmail for me; disabling allows Gmail to load. Otherwise, it won't bring me to my inbox.

 
LouCypher Script's Author

@lootpacker: you're just two and a half years late.

 
lootpacker User

seems you beat me to it, very useful script btw.

 
LouCypher Script's Author

@dhongi: Yes, it can. Just change line 17
from

  } else if(n.tagName != 'STYLE' && n.tagName != 'SCRIPT' && n.tagName != 'PRE') {

to
  } else if(n.tagName != 'STYLE' && n.tagName != 'SCRIPT') {

 
dhongi User

Wow, jusat what I was looking for, thanks.

Can this script work for non-HTML pages, such as when we do "View CSS" or "View Source" using the Web Developer extension for Firefox?

I use these features a lot but right now, I first copy the entire page to notepad and then read it. If this script could do it automatically in the browser itself, it'll be awesome.

 
LouCypher Script's Author

@BlueDrache, it's because the page you mentioned is using the PRE tags. You can include PRE tags by removing && n.tagName != 'PRE' in the script.

 
BlueDrache User

Does not work as expected.

See:

http://rubyforge.org/pipermail/mongrel-users/20...

 
jw25 User

Works perfectly. Thanks

 
Sean M. Burke Scriptwright

FYI, http://userscripts.org/scripts/show/2641 is a somewhat fancier version of this general approach.

 
LouCypher Script's Author

Updated

 
Jim Roberts User

You're welcome.

 
Jim Roberts User

Replace

document.body.innerHTML = document.body.innerHTML;

With

document.body.parentNode.insertBefore(document.body, document.body);

innerHTML breaks any eventListeners.