topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 7:28 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [Firefox] [Bookmarklet] Show all comments in a webpage.  (Read 11044 times)

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
[Firefox] [Bookmarklet] Show all comments in a webpage.
« on: December 01, 2009, 05:11 PM »
Code: Javascript [Select]
  1. 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.
« Last Edit: December 01, 2009, 05:38 PM by scancode »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #1 on: December 01, 2009, 05:24 PM »
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?
« Last Edit: December 01, 2009, 05:27 PM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #2 on: December 01, 2009, 05:28 PM »
it might help to tell people what to do and what this bookmarklet is supposed to do.

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #3 on: December 01, 2009, 05:39 PM »
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.

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.

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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #4 on: December 01, 2009, 06:02 PM »
works! fun stuff!!

jity2

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 126
    • View Profile
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #5 on: December 10, 2009, 02:24 AM »
Hello,
New to this!
This page helped me also understand what is a bookmarklet !
http://www.labnol.or...l-bookmarklets/7931/

LiquidGravity

  • Participant
  • Joined in 2008
  • *
  • Posts: 5
    • View Profile
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #6 on: December 16, 2009, 09:48 PM »
Here is a great online tool that I found that you might like mouser. It lets you make a custom button for Firefox out of anything that can be loaded in the firefox url bar (including links and javascript). You can use your own icons and even redistribute the file if you like. I have a few that I made and use regularly. It works great.

http://codefisher.org/toolbar_button/link-button-maker

I found that the following site has many useful bookmarklets. https://www.squarefree.com/bookmarklets/
Specifically the url navigation ones like Up, Top, Increment, Decrement,

A few other fun bookmarklets are the ones for vozme.com, and TinEye

LiquidGravity

  • Participant
  • Joined in 2008
  • *
  • Posts: 5
    • View Profile
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #7 on: December 16, 2009, 09:52 PM »
Oh also I found an interesting view on bookmarklets and I would have to agree with its author. There is definitely a possibility of malicious bookmarklets and they must be viewed like any other software you install. Can you trust it? http://www.hunlock.com/blogs/Bookmarklets_--_The_Evil_Lurking_In_Your_Browser

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: [Firefox] [Bookmarklet] Show all comments in a webpage.
« Reply #8 on: December 17, 2009, 01:10 PM »
Oh also I found an interesting view on bookmarklets and I would have to agree with its author. There is definitely a possibility of malicious bookmarklets and they must be viewed like any other software you install. Can you trust it? http://www.hunlock.com/blogs/Bookmarklets_--_The_Evil_Lurking_In_Your_Browser

Nice link!
You might liek to take a look to the JS Beautifiers, they even unpack packed/"protected" scripts.