Yep, you rule man!
I couldn't make that work
in a macro though, only as bookmarklet.. It seems to work better for me when escaping the ':s (the ..eh.. blipps).
Also, you should close your streams after you're done :-)
ugly_source {
menu = "Ugly but Current Source";
$javascript_enabled = getpref(BOOL, "javascript.enabled") ;
setpref(BOOL, "javascript.enabled", true) ;
open("javascript: (
srcdoc=window.open(\'\').document).write(\'<html><textarea rows=\\'30\\'cols=\\'100\\'>\'+document.documentElement.innerHTML.replace(/textarea/gi,\'text area\')+\'</textarea></html>\') ;
srcdoc.close();");
setpref(BOOL, "javascript.enabled", $javascript_enabled) ;
}
But it only works with local files, right?
If it's local files that is important for you (you're obviously a developer?), check out the
smart source thread[/u] .
And please post the merge here :-))
How do you get this to work non-locally? Security prefs? (Not important, just curious.)
/H