Jasmine Tweak: Show Passing Tests by Default

One of the most useful tools for coding is a testing framework, to show when code breaks, and to also add to documentation. For my purposes, I recently learned about a small BDD framework known as Jasmine. I won’t describe how to use it, for that has been done well already. Instead, I’ll point out a small modification that I employed:

Problem:  I have to press ‘show passed’ to show passed tests every time I refresh the page.  I refresh every time I add a new test.  I want to have it show passed tests by default.

Solution:  Open the jasmine-html.js file.

On line 34, find

this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },

And replace with

this.outerDiv = this.createDom('div', { className: 'jasmine_reporter show-passed' },

Specifically, this adds the show-passed class to the reporter when it starts.

Then, we have to make the checkbox accurately reflect its on by default.

Find (line 41)

showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),

and replace with

showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox', checked: true }),.

Now passed tests will show by default when you load the page.

Mibbit CSS

Seeing that in the Mibbit client, the whois box is not easy to modify in prefs, I created the following stylesheet.  To use it, you need the extension known as Stylish.

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain(“mibbit.net”),@-moz-document domain(“mibbit.com”) {

.whoisdiv, .whoisdiv>div, .whoistop {

/* Makes whois box container smaller */
border-top: none !important;
padding: 0px !important;

.whoistable {

/* I like #ccccff use whatever you want.  */
background:#ccccff !important;

.whoistop {

/* color of the “Whois nick” line */
color: #8888aa !important;

.whoistable tbody tr td table tbody tr :first-child{

/* color is a darker version of #ccccff.  Color for the text saying what each field is.
color: #555588 !important;


Locationbar Results Context Menu and Button-Bar (Firefox)

I propose an idea for a firefox extension.  Well, it can be an extension, or possibly a full patch for Firefox so that others can use the basic idea.

In Firefox, and all browsers, there is this thing known as a locationbar.  In Firefox, it doubles as a search for history.  The idea of this was tagged ‘awesomebar’.  It works pretty well, but I notice something.  It is without a context menu that I think would help the advanced user heavily.

Why would a context menu help?  Well, it would be a context menu that is useful for doing changes to the Places architecture that was also added.  It could also, just for the sake of duplication, give common opening functions.  The main idea though, is the context menu.  Ubiquity could use a context menu to use commands with the noun type of URL and has no arguments.

Personally, what would I like to see in such a context menu though?  I shall list it here:

  1. Open->
    1. Here
    2. New Tab
    3. New Window
    4. Favicon
    5. Source
  2. Remove Page From History
  3. Remove Site From History
  4. Bookmark (or Remove Bookmark)
  5. Copy->
    1. URL
    2. Title

For Open, you can easily do Here and New Tab with the mouse, and are duplicates.  I have no clue how to open a tab in a new window, and I do not care to learn.  I like one window, and cope by faviconizing tabs.  The Favicon is there because I personally have a hard time finding the links to them myself for some reason.  It is also there because it means you do not have to open the page or the source of it to obtain it.  The source option is there for the same reason.

Remove page from history removes the one individual item.  The remove site option does it for any of the site, as said somewhere elese.   Bookmark allows bookmarking a page without having to visit it, just like Open->Source makes it so that you do not have to open the page to view source.

Copy is there because copy is always there…  😛

Anybody with Firefox Extensibility skills, or wants to learn how to make an extension should attempt to make this, as you already have a potential user.

Zoom In (and Out) To A New Webpage

In computing, a zooming user interface or zoomable user unterface (ZUI, pronounced zoo-ee) is a graphical environment where users can change the scale of the viewed area in order to see more detail or less.


Basically, you can zoom in and out of a pane to get more details of a hard to see area, like zooming in on a high-res image, and move from area to area.  A great example of this is Google Maps (Or Yahoo).

Imagine a web where you drag a box over a webpage, and depending on the area you go over, that area zooms in, and more content is shown.  I don’t really have animating skills, so I can’t show you, so I’ll try to describe an example.  Basically, expand the ZUI to hide unwanted content (and not just because there are not enough pixels to show it) Read the rest of this entry »