cn_ubb_enhance - Enhance your Cloudy Nights user experience

The Cloudy Nights forum is one of the most popular astronomy forums on the Internet. This page presents a way to enhance your user experience when participating on Cloudy Nights when browsing with Firefox (sorry, no other browser can be supported):

  • Add quick context links to single posts when browsing the live forums and the forum archives in ‘flat’ mode.
  • Create the UBB code for inserting a link to a post in a message (for displaying in ‘flat’ mode or in ‘threaded’ mode). You can copy the text from the popup and paste it to any post, easing the addition of links.
  • Highlight NGC, IC and Messier objects in posts, and create links to those objects on the NGC-IC project website.
  • Large images (attached to posts or hotlinked) can be clicked to open them in a separate window. When the mouse pointer hovers above such images, a tooltip will show up.
  • Warn when an update of the script exists.

To enable this functionality, there are 2 ways.

1. Installation as a GreaseMonkey script

You need to install the GreaseMonkey plugin in FireFox. This free plugin provides a way to run scripts (JavaScript) on selected websites. Once enabled a monkey face will appear at the bottom right of your browser window (click the face to disable GreaseMonkey). Now you can install the script by retrieving it from http://shutterfreak.net/xtra/greasemonkey/cn_ubb_enhance/cn_ubb_enhance.js.

2. Installation as a FireFox addon

The GreaseMonkey script has been transformed into a FireFox extension and can be downloaded from http://shutterfreak.net/xtra/greasemonkey/cn_ubb_enhance/xpi/cnubbenhance.xpi.

History

VersionDateNotes
0.5 2009-01-17

First version with mature functionality.

Completely rewrote the Messier/NGC/IC matching code to correctly handle the DOM tree instead of a crude yet smart innerHTML search and replace.

0.4.5 2009-01-16

Leave nonexistent Messiers (e.g. M111) untouched. All versions since 0.4 are affected and show 'undefined' instead of the original label.

TODO: currently the search/replace algorithm that hunts for NGC/IC/M patterns does this without checking whether the match is part of a hyperlink or an image link. As a result, sometimes the pattern substitution happens where it shouldn't, resulting in a broken link and HTML code appearing in affected posts. Disabling GreaseMonkey and reloading the page entirely cures this. But that's probably not why you want to run this script Wink

0.4.4 2009-01-16

The script may run before the images have been loaded, resulting in reported image dimensions of 0x0 or 70x16 (sigh), or in the image not being reported yet. Fixes and changes (Greg K.):

  • Added a exception for 0x0 (and 70x16 - sigh) images in the 'small image' check.
  • Added a 1px solid border for non-oversized images (sometimes no border was showing).
  • Moved image popup code into a separate function for readability.
  • Moved tooltip title code into a mouseover handler so it gets the sizes in real time.
  • Added 'cloudynights.com/stars' to the external image check, star contributor stars were showing as external.
0.4.3 2009-01-15 Do not show the popup for img tags if they are smaller than the minimal size (cn_img_minWidth x cn_img_minHeight).
0.4.2 2009-01-15 Added popups for img tags in posts (Greg K.). Highlight images that exceed the maximum CN image size by a dashed red border. Image dimensions and whether they're internal/external to CN is added to the image tooltip title.
0.4.1 2009-01-09 Regular expressions for NGC/IC/M objects were too greedy by nature. Add '\b' at start and end of each RE to stop at word boundaries. Rewrite cn_forum_base_url() and cn_forum_flat_mode() to use regular expressions instead of a plethora of string comparisons. After running javascript weblint: fix equality test that was written as an assignment in ubb_post_link().
0.4 2009-01-09 Added Messier links to the NGC/IC project. Changed the way posts were parsed to include parsing of quoted posts in messages. Also parse when on 'cloudynights.com' next to 'www.cloudynights.com'. Document the software code.
0.3.5 2009-01-03 Added links to the NGC/IC project for NGC and IC labels only.
0.3.3 2009-01-03 Added post links to flat mode.
0.2 2009-01-03 Fix some errors.
0.1 2009-01-02 First version: provide links to individual posts in threaded mode when in flat mode.
Nemo's picture

Greasemoney problems

Is there a problem with the greasemonkey script? Ive tried installing but it seems to be a bit buggy

Olivier Biot's picture

Re: Greasemonkey problem

Which problem are you referring to? I am aware of the update popup which apparently shows random versions. I believe this is due to my web host's cache configuration.

I am considering releasing cn_ubb_enhance as a FireFox module only, since this removes the burden for checking for updates as well.

Best regards,

Olivier

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
By submitting this form, you accept the Mollom privacy policy.