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.

No comments: