ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

[Firefox] [Bookmarklet] Show all comments in a webpage.

(1/2) > >>

scancode:

--- Code: Javascript ---javascript:(function () {var g=document.getElementsByTagName("html")[0].innerHTML.match(/<!(?:--[\s\S]*?--\s*)?>\s*/g);var h="<style>table{text-align:center;font-family:Verdana;color:#404;width:100%;background-color:#fafafa;border:1px #d79900 solid;border-collapse:collapse;border-spacing:0px}td.sa{border-bottom:2px solid #d79900;background-color:#fff2ba;text-align:center;font-family:Verdana;font-weight:bold;font-size:11px;color:#404}p.sa{text-align:left;font-family:Verdana,sans-serif,Arial;line-height:1.2em;color:#404;background-color:#fafafa;text-indent:-8px;margin-left:10px;margin-right:10px;margin-top:5px;margin-bottom:5px}.p{padding:2px;margin:2px;border:1px solid black}</style><table cellspacing=0><tr><td class=sa>Comments found in Document</td></tr>";for(var i=0;i<g.length;i++){h=h+"<tr><td class=p><p class=sa>"+g[i].replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\n/g,"<br />")+"</p></td></tr>"}h=h+"</table>";var j=document.createElement('iframe');j.setAttribute("src","about:blank");j.setAttribute("height","300");j.setAttribute("width","100%");j.setAttribute("style","border:0;margin:0;padding:0;");document.body.appendChild(j);j.contentDocument.open();j.contentDocument.write(h);j.contentDocument.close();scrollTo(0,999999)})()
Done for teh mouse man.

mouser:
doesn't seem to work for me or i dont know how to use it.. i selected the entire text, pasted it onto my link toolbar in firefox.  when i click it nothing happens.
i should note i dont actually use any bookmarklets, or havent in the past, mainly because my brain seems to just balk at the way bookmarklets are added to browser bookmark area -- i don't know why browser makers insist on making it such an ugly kludge.. if this is something we are supposed to do cant they build in a little nice support for this?

mouser:
it might help to tell people what to do and what this bookmarklet is supposed to do.

scancode:
doesn't seem to work for me or i dont know how to use it.. i selected the entire text, pasted it onto my link toolbar in firefox.  when i click it nothing happens.
-mouser (December 01, 2009, 05:24 PM)
--- End quote ---

Try scrolling to the bottom of the page.
Edit: done automagically now.

it might help to tell people what to do and what this bookmarklet is supposed to do.
-mouser (December 01, 2009, 05:28 PM)
--- End quote ---

The script does just what the topic says. Show all comments in a webpage['s HTML code].

mouser:
works! fun stuff!!

Navigation

[0] Message Index

[#] Next page

Go to full version