mimic opera's fit to width. Tested on firefox 3.0b1 & safari 3.0.4

  • use this css:
    pre { white-space: -moz-pre-wrap; } /* gecko */
    pre { white-space: pre-wrap; } /* webkit */
  • use this bookmarklet (based on ruderman's original and some variants):
    javascript:
    (function() {
        var width = Math.round(self.innerWidth / 16);
        var max = width + 10;
        var baseWidth = new RegExp('\\S{' +width+ '}\\S');
        var oldWidth = new RegExp('\\S{' +width+ '}[a-zA-Z\\d]*[^a-zA-Z\\d\\n]');
        var newWidth = new RegExp('\\S{' +width+ '}[a-zA-Z\\d]*', 'g');
        var maxWidth = new RegExp('\\S{' +max+ '}\\S', 'g');
        var texts = document.evaluate("//body//text()[not(ancestor::script)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
        var tdata;
        for (var i = 0; i < texts.snapshotLength; i++) {
    	tdata = texts.snapshotItem(i).data;
    	if (baseWidth.test(tdata)) {
    	    if (oldWidth.test(tdata))
    		texts.snapshotItem(i).data = tdata.replace(newWidth, "$&\n");
    	    else if (maxWidth.test(tdata))
    		texts.snapshotItem(i).data = tdata.replace(maxWidth, "$&\n");
    	}
        }
    })();
    			
  • or, use per-site css: For oversized images and other anomalies, it's possible to isolate the offending content instead of wrapping it. This only works on a per-site basis. e.g., the style:
    .story-container { max-width: 700px; } /* webkit only */
    .story, .comment { overflow: auto; } 
    limits horizontal scrolling on macosxhints.

i_was_the_shadow_of_the_waxwing_slain_by_feigned_remoteness_in_the_windowpane_i_had_a_brain_five_senses_one_unique_but_otherwise_i_was_a_cloutish_freak_in_sleeping_dreams_i_played_with_other_chaps_but_really_envied_nothing_save_perhaps_the_miracle_of_a_lemniscate_left_upon_wet_sand_by_nonchalantly_deft_bicycle_tires