i was fiddling helping someone with their css, and i accidentally started to write something useful.
i want to open this up to any javascript coders out there, to collaborate on something that is specific to actinic, and not just the web.
here is what i did:
basically, it uses the notion of bookmarklets, to traverse the DOM on a page and change the css, amongst other things.
paste this code into the very top of a page, and then click the links to trigger script, on that page.
i'm sure there are some actin ic specific features that could be added. but i'v started the ball rolling here. i'll probably work on this myself later, but if anyone else has any input, thatd be great.
i want to open this up to any javascript coders out there, to collaborate on something that is specific to actinic, and not just the web.
here is what i did:
HTML Code:
<div style="padding:2px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #0e0e0e; background-color: #fefefe; border: 1px solid #999999;"> [ debug toolbar test] res: <a href="javascript:javascript:top.resizeTo(640,480);">640x480</a> - <a href="javascript:javascript:top.resizeTo(800,600);">800x600</a> - <a href="javascript:javascript:top.resizeTo(1028,768);">1028x768</a> - <a href="javascript:javascript:top.resizeTo(1280,800);">1280x800</a> - <a href="javascript:javascript:top.resizeTo(1280,1024);">1280x1024</a> <br> <a href="javascript:(function(){var newSS; newSS=document.createElement('link'); newSS.rel='stylesheet'; newSS.type='text/css'; newSS.href = 'http://www.cs.hmc.edu/~jruderma/block-structure.css'; document.getElementsByTagName('head')[0].appendChild(newSS); })();">Show Tables</a> - <a href="javascript:void(d=document);void(el=d.getElementsByTagName('div'));for(i=0;i<el.length;i++){void(el[i].style.border='1px dashed gray')};void(el=d.getElementsByTagName('span'));for(i=0;i<el.length;i++){void(el[i].style.border='1px solid black');}">Show divs</a> - <a href="javascript:(function(){var i,x;for(i=0;x=document.styleSheets[i];++i)x.disabled=true;})();">Disable CSS</a> - <a href="javascript:(function(){var atags,i,name,a; anchs = document.anchors; for(i=0; i<anchs.length; ++i) { a = anchs[i]; name = a.name; a.appendChild(document.createTextNode('#' + name)); a.style.border = '1px solid'; a.href = '#' + name; } })();">Show anchors</a> </div>
paste this code into the very top of a page, and then click the links to trigger script, on that page.
i'm sure there are some actin ic specific features that could be added. but i'v started the ball rolling here. i'll probably work on this myself later, but if anyone else has any input, thatd be great.
Comment