Ken, how about a link to where we can save it from? I'd *love* printable DOM
views! ;-) I don't know how to save a bookmarklet using source code :-S

Here's a bookmarklet I found that's muy useful if you want to see how a page
is built, it's the Mouseover Dom Inspector:
http://slayeroffice.com/tools/modi/v2.0/modi_help.html

ciao,
Zulema

!!blue
w e b d e s i g n e r
folio: http://zoblue.com
blog: http://blog.zoblue.com
browser: http://getfirefox.com

On 10/15/05, Ken Martin <[EMAIL PROTECTED]> wrote:
>
>
> I made this bookmarklet to quickly make printable DOM views from any
> page you're viewing. Not sure if this will survive email, but here goes:
>
> javascript:var%20nodes=document.body.childNodes;if(nodes.length>0){var
> %20theCSS='<link%20href="http://kpmartin.com/nice.tree.view.css"%
> 20rel="stylesheet"%20type="text/css"%20media="all"%20/
> >';exclusionList=/^(a|b|br.*|i|img|q|strong|cs.*|jsx.*)$/
> i;out='<ul>';getem_slave(nodes);out+='</ul>';var%20re=/<ul><\/ul>/
> gi;out=out.replace(re,'');var%20theWinref;theWinref=window.open
> ('','_blank','width=500,height=600,toolbar=yes,location=no,directories=n
> o,status=yes,menubar=no,resizeable=yes');theWinref.document.write
> ('<html><head><title>Nice%20Tree%20Map%20of%20'+window.location.href
> +'</title>'+theCSS+'</head><body><p>'+window.location.href+'</p>'+out
> +'</body></html>');theWinref.resizeTo(450,600);theWinref.moveTo
> (0,0);out='';}function%20getem_slave(nodes){for(var%
> 20n=0;n<nodes.length;n++){var%20thisNode=nodes[n];if
> (thisNode.nodeType==1){var%20theTag=thisNode.nodeName;if(!
> exclusionList.test(theTag)){if(thisNode.getAttribute('id')){theTag
> +='#'+thisNode.getAttribute('id');}if(thisNode.getAttribute('class'))
> {theTag+='.'+thisNode.getAttribute('class');}out+='<li>'+theTag;if
> (thisNode.hasChildNodes()){out+='<ul>';getem_slave
> (thisNode.childNodes);out+='</ul>';}out+='</li>';}}}}
>
> Ken Martin
>
>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to