Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Force Wrap

Wrap text automatically.

Based on Jesse Rudderman's Force Wrap bookmarklet.

Screenshots:

Before:
before
After:
after

Changelog:

  • 2006-05-15: replaced Jim's codes with codes from MR Tech Link Wrapper to fix regression in Firefox 2.0/3.0 dev builds.

  • 2006-01-09: replaced innerHTML with insertBefore. Thanks to Jim Roberts

You might also want to try MR Tech Link Wrapper extension by Mel Reyes.





Mar 5, 2008
RNiK User

Doesn't seem to work on SourceForce.

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

 
Feb 3, 2008
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.

 
Jan 28, 2008
LouCypher Script's author

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

 
Jan 27, 2008
lootpacker User

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

 
Oct 19, 2007
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') {

 
Sep 28, 2007
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.

 
Dec 30, 2006
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.

 
Nov 13, 2006
BlueDrache User

Does not work as expected.

See:

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

 
Nov 9, 2006
jw25 User

Works perfectly. Thanks

 
Jul 17, 2006
Sean M. Burke Scriptwright

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

 
May 15, 2006
LouCypher Script's author

Updated

 
Jan 10, 2006
Jim Roberts User

You're welcome.

 
Jan 4, 2006
Jim Roberts User

Replace

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

With

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

innerHTML breaks any eventListeners.

You could comment on this script if you were logged in.