RSS Site Index Panel

RSS Panel is designed as a generic Greasemonkey user script for any website. It's purpose is to display a little floating panel at the left hand top of any web page, for which a RSS feed is available from the same domain.

The RSS Panel displays the feed title, followed by a list of all feed subjects, linked to their destination pages. At the bottom of the list follows a direct link to the RSS feed (this comes in handy if you want to add the feed to your personal Yahoo page or something similar).

The demo

If all works well, you see a horizontal, yellowish bar at the left upper corner of the browser window.
Initially the panel is collapsed and shows only a title. You can expand/collapse the panel by double clicking, or selecting the expand box, which looks like this: [>].
There is a "close box" [x] which removes the panel from the page. This is not persistent, the panel emerges again if you reload the page.
You can move the panel out of the way by simply dragging it around.

Installation

Install the script rsspanel.user.js as a greasemonkey user script. Refer to the Greasemonkey site for more info.

As of version 1.12 I have also a stand alone Firefox Extension, which you can download from RSS Panel on the Mozzila Update site. Please note: the Firefox extension may be a version or so behind, because of approval procedures and me simply don't giving it the attention it deserves ;-(

How it works

The technical explanation; this technique is called "AJAX" according to the latest buzzwords.

Limitations / bugs

Greasemonkey is a Mozilla Firefox extension, so the script is only tested for Firefox v1.0x. However, the demo on this page works in some different DOM compliant browsers as well - YMMV!
Note: Safari 1.2.x has a bug, which prevents the content of link elements from being accessed through DOM methods. The test case illustrates this in more detail. After a little tweak with namespaces, the script now works fine in Safari 1.3.
Note: MSIE (Windows) also has problems due to this bug: setAttribute does not work when used with the style attribute. A work around has been implemented since version 1.01 of the script.

Reading the RSS is done through XMLHttpRequest. The browser security model only allows the retrieval of documents which are served from the same host as the web page containing this function call (same host constraint).
This means that the RSS Panel can not be loaded for feeds outside the current domain, e.g. a feedburner link. In that case, nothing is displayed; the script fails silently.

See also

Links about Greasemonkey.

Changelog

 version 2.00
 	- compatibility with Firefox 1.5 and GM 0.6.4 (release candidate)
 	- enhanced security model: used XPCNativeWrapper to access
 	  native DOMParser object
 	- added "check for updates" functionality; had to remove
 	  top level wrapper function to do this in a clean way.
 	- Fix: apparently GM_XMLHttpRequest now needs fully qualified url.
 	- reset margin on divs (some CSS sheets define a non zero value for
 	  every plain div, don's ask me why).
 	- replace missing title and links with 'Untitled item #X" and
 	  #RSS_MISSING_LINK respectively.

Version 1.18
	- fix for Firefox 1.5x; all events implemented in a W3C compliant way.
	  Some code taken from "DOM-Drag by Aaron Boodman, 2001
	  http://www.youngpup.net/2001/domdrag
	  Final version from Book Burro:
	  http://www.lysator.liu.se/~jhs/userscript/bookburro/0.16.user.js

Version 1.17
	- work around for Turnabout where GM_XMLHttpRequest returns
	  resultXML as text string (= alias for resultText), Aaargh!
	- minor design tweaks for MSIE's CSS box model
	TODO:
	- XMLHttpRequest is still very fragile under Turnabout ;-(

 Version 1.16
	- minor fixes to restore MSIE compatibility
	  Welcome back, turnabout users!
	- fix with GM_log
	- call document as property of window (global) object
	  (waiting for new GM version)

 Version 1.15
	- use GM_xmlhttpRequest() if available (GM 0.2.6+): 
	  loads any RSS feed, regardless of originating domain
	  this means for instance that feedburner feeds are working.

 Version 1.14
	- logging through GM_Log if available (GM 0.3.3+)
	- namespace now points at the script's home page

 Version 1.13
    - fix for RSS feeds missing the description element
    Thanks to Andy Dustman for reporting this.

 Version 1.12
    - fix character encoding again (pure ASCII)

 Version 1.11
    - minior fix with character encoding (UTF-8)
    - generated GUID for Greasemonkey Compiler
      http://www.letitblog.com/greasemonkey-compiler/
    - GUID: {821ac008-72db-4ccd-94b9-722ccba5b28a}

 Version 1.10
 	- Changed license to GPL
 	Added by Brandan Lloyd:
	- Added title bar to make it draggable, 
	- Allow the user to double-click to open and close so that 
	  clicking on a link doesn't toggle the view state, 
	- Added a little icon for opening and with a single-click, 
	- Added a scroll bar so that if the Reader is longer
	  than the page the user can scroll.
 	
 Version 1.03
 	- Added a link to the discovered RSS feed (suggested by Nathan Howell)
 
 Version 1.02
 	- Moved link to RSS home to bottom of list (suggested by Neil Kandalgaonkar)

 Version 1.01
 	- Initial release
$Id:$

About Greasemonkey

Greasemonkey is a Firefox extension, which can change web pages by applying cleverly crafted user scripts after they are loaded in the browser.

Tip! Greasemonkey Hacks by Mark Pilgim.

More Greasemonkey User Scripts

For more, and a couple of Greasemonkey resources, see Greasemonkey User Scripts.