Tuesday, October 14, 2008

Exporting and importing the blacklist

There are couple of requests to add export and import feature for the blacklist, allowing it to be shared among fellow bloggers.

There is a hack that you can use until it is properly implemented. BE CAREFUL, YOU WERE WARNED.

The blacklist is maintained as part of the FireFox's preferences system. FireFox's preferences can be accessed by visiting 'about:config' page. Preference name for the blacklist is 'extensions.coloments.blacklist' and it should be entered into the filter box to filter out other preferences.
Double clicking on the value (highlighted in the above screenshot) will open up a input box with current value. This can be copied and shared with others, and someone else's blacklist can be pasted in as well.

Format of the blacklist:
There are two delimiters, '_@@_' which separate one blogger from another, and '_::_' which separate blogger from type (0 - nick, 1 - id).
e.g.- peter_::_0_@@_lasantha_::_0

The extension will work as long as the format of blacklist is correct, and the preferences management UI of CollapseComments will interpret them properly.

There are couple of things that I would like to point out regarding the preferences management UI.
  1. The 'Add' button of the preferences management UI brings focus back to blogger textbox automatically, and selects the existing text.
  2. Tab key will move the focus from one field to another, in a cycle.
  3. Up/Down arrows will change the select box value between nick and id.
  4. When they have the focus, pressing 'Space' or 'Enter' keys will be same as clicking 'Add' and 'Delete' buttons.
  5. Pressing 'Space' on the checkbox will check/uncheck it.

Sunday, October 12, 2008

CollapseComments 0.0.1 is ready

CollapseComments is a FireFox extension that can selectively collapse (and expand too) comments based on nicks and profile ids. This version (0.0.1) supports the comments view, where comments are posted, in blogs hosted by www.blogger.com. I've attached a screenshot of comments view at the bottom of the post.

Extension is hosted at addons.mozilla.org and you can install it by visiting the following URL.
Currently the extension is in the sandbox, awaiting some reviews, to be nominated for public section. Therefore anyone interested will have to have a addons.mozilla account (or create a one, which is quite is easy) in order to install CollapseComments. I would appreciate if some of you guys/gals can add some reviews, so that I can apply for the nomination for public section. Extensions in the public section can be installed without an addons.mozilla account. Also it would be very helpful to know the issues faced, during the usage of CollapseComments. Suggestions/enhancements are also welcome.

Once installed the extension will add a status bar icon that can be clicked to collapse and expand comments. The icon will change between and based on the current status, expanded and collapsed, respectively.

A context menu is attached to the status bar icon, which can be accessed by right clicking on the icon. There are two menu items to collapse or expand all comments in the page. There are two more menu items, one to access the preferences management UI and another to perform the collapse/expand operation.



Preferences management UI is pretty much self explanatory.

If checked, the 'Collapse on load' will automatically collapse comments during page load.

Nicks can be used to collapse comments of everyone - original as well as impostors - using that nick.

Profile ids can be used to collapse comments posted by that id, which is useful in two scenarios
1. nick can not be used as original id using the nick should not be collapsed
2. different nicks are used by a single id and all those comments should be collapsed

Its also possible to read comments of selected set of bloggers. In this case these blogger nicks and/or ids should be added using the preferences and a 'Collapse All' followed by a 'Expand' can be used to expand the comments of those selected bloggers.

Inspiration:
DefenceWire and DefenceNet are two blogs doing a yeoman service regarding the current Sri Lankan conflict by providing accurate information to the online community. They allow users to comment on their posts with minimum moderation. From time to time spammers and impostors ruin the day of everyone by posting garbage. Even though this extension can be used with any blog hosted by blogger.com, it started as an effort to make the life easy for people in these two blogs.

Comments view:
This is a sample comments view taken from one of the DefenceWire posts. This view already has the capability to collapse comments using 'Collapse comments' link at the top or by clicking on the 'said ...' against individuals nick. 'Collapse comments' link will collapse all the comments and clicking on 'said ...' will collapse only that comment. CollapseComments extension is to collapse multiple comments based on nicks and ids, automatically.