Thinking Out Loud

May 3, 2006

Privacy icon in Less Detail mode?

Filed under: Greasemonkey, Firefox

The next feature I would like to add to the Ma.gnolia Condenser would add the privacy action icon (a lock) visible even in Less Detail mode. More exercise for XPath syntax, which I like. I started off making a mental checklist:

  • Check to see the Less Detail version of the page is displayed
  • Check to see if the script is running on a page of the signed in user
  • Use the Greasemonkey function GM_xmlhttpRequest to grab the More Detail version of the page so I will know which links are private
  • Get the "shortname" of the link so I can compute the href and the element ID for the privacy options link
  • Create the necessary DIV, A, IMG elements to show a lock image

Then it occurs to me there seems to be a simpler, faster, and easier to maintain way to do the same thing.

  • Check to see the Less Detail version of the page is displayed
  • If so, redirect to the More Detail version of the page, then hide the description and extra action icons using CSS (show the Privacy icon only)
  • Change the More Detail link so that it unhides the same on a click
  • If the More Detail version of the page is displayed, change the link so that it hides the same on a click

If I write the script the second way, the real Less Detail never appears, only a greased version of the More Detail page. It almost seems unethical!  I am still considering any possible downside to doing it the easier way.

Comments »

The URI to TrackBack this entry is: http://gui.blogsome.com/2006/05/03/how-to-display-privacy-icon-in-less-detail-mode/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>























Get free blog up and running in minutes with Blogsome | Theme designs available here