Bypass LiveHTTPHeaders Error: Components is not defined

November 26, 2005 at 11:00 pm (HowTo)

I just installed LiveHTTPHeaders extension into my firefox yesterday. Actually I have been using it since my Mozilla-suite’s old days, and it really helped a lot during the endless debugging sessions in my thesis project (Well, finally I’m a graduate now! :) ).

I have noticed this bug since then. When you run the LiveHTTPHeaders window, everything are just cool until after you close it, the Javascript Console will be flooded by a repeating error:

Error: Components is not defined Source File: chrome://livehttpheaders/content/LiveHTTPHeaders.js Line: 427

Thanks to Daniel Kabs’s workaround, now the bug is bypassed (as he said, it’s not a fix yet). However, rather to extract the whole jar and modify many unnecessary files (shown in his instruction [a] and [b]), I chose to extract only the particular file, modify it and add it back to jar. Here’s what I did:

  1. Find livehttpheaders.jar – I’m using Win2k installed in C drive. So normally firefox keeps all extensions under C:\Document and Settings\Application Data\Mozilla\Firefox\Profiles\xxxxx.default\extensions directory. From there, you can find the livehttpheaders.jar file under {8f8fe09b-0bd3-4470-bc1b-8cad42b8203a}\chrome directory.
  2. Extract LiveHTTPHeaders.js with WinRAR – I think both WinRAR & Winzip will do the job. Just browse into the jar file, find LiveHTTPHeaders.js under content directory and extract it.
  3. Add two lines of code to LiveHTTPHeaders.js – as suggested by Daniel, quoted as below:
    // This is the observerService's observe listener.
    observe: function(aSubject, aTopic, aData) {
    +		if (typeof Components == 'undefined')
    +			return;
    if (aTopic == 'http-on-modify-request') {
    aSubject.QueryInterface(Components.interfaces.nsIHttpChannel);
    (added the lines with the + at the beginning,
    but add them without the +!)
  4. Add LiveHTTPHeaders.js back to livehttpheaders.jar - just drag & drop it back into the WinRAR window, WinRAR will do the job for you. BTW, make sure you close the firefox before you add the file, otherwise it will fail as firefox is using that jar file.

Yeah, that’s all! ;)

Permalink 2 Comments

Virtual Postcard

November 25, 2005 at 10:40 am (Funs)

Just visited a fun site (or more as an artistic sandbox) mentioned by TBray. He shouldn’t doubt this as the best flash card, since it is currently the “Best” and “Most popular” card in the site (I don’t read Russian, so how do I suppose to know that? Hint: see its traslated version ;) ).

Permalink Leave a Comment

Technology Misuse?

November 24, 2005 at 6:59 pm (Web)

I have been using the brand-new firefox browser for almost a week. Well, it is quite a pleasent experience, especially with Sage extension. Since it always knows what I “browsed” the last midnight, and recall me the next morning when I open the browser.

Several days ago, I installed the web developer extension into my firefox. I don’t have a chance to *actually* use its functions, since I do more reading recently rather than playing with codes. However by accident, I do find a function which is *suprisingly* useful for online readers like me to protect our eyes from long hours browsing.

So, here’s the suprising function: Display Topographics Information under Information tab. Eventually, it turns the whole web page into grayscale tone. Well, I’m not really sure what is its original intention; but now, I’m using it to darken the page’s background to reduce the direct bright light from hurting my eyes.

(oh, here’s a screeshot.)

10

It seems like I’m misusing the technology now.. ha, but it really helps me to solve my eye-tiring problem. BTW, it reminds me about an old joke of technology misuse (and they even made a movie clip for this joke, LOL) :P

Permalink Leave a Comment

A midnight hiccup in WP.com

November 18, 2005 at 1:25 am (Undefined)

Well, now’s 1.02 A.M.

While trying to reload and read back the entry I just wrote in RESTy Lab (well, just to check my English ;) ), suddenly the page was returned without any CSS styling.

A big red “!” sign then appeared in my Firefox’s Web Developer toolbar, nagging about an error as below:

Error: The stylesheet http://wordpress.com/invite/wp-newblog.php/wp-content/themes/connections/style.css was not loaded because its MIME type, “text/html”, is not “text/css”.

Wow, what’s happening? When I viewed the page source, I found that all links’ prefix has become http://wordpress.com/invite/wp-newblog.php, rather than the correct prefix: http://toydi.wordpress.com. Opps, a hiccup! ;)

Anyway, thanks to Donncha who already fixed it, while I was sending him the complain. :P

Well, all the best to WP.com! BTW, looking forward to have a chance to submit a small wish list according to our user-experience about WP.com blogging features. Or is there already a place for us to drop a line?

Permalink Leave a Comment

How I switch to Firefox

November 15, 2005 at 10:42 pm (HowTo)

I love reading. Especially after having ADSL signals tunneling through my phone wire, I spend more time reading online. Like most of the other users, I read using browsers. Rather to have only one browser installed, I have several browsers in my WinOS box, including Opera, Mozilla Suite, Firefox and and of course, the default IE (oh.. believe or not, and Lynx too! ;) But I only tried it once).

As an online reader, I wish my browser to have these features:

  • Saved Session (as in Opera) – able to recall which page and until where I read in the last browsing session.
  • Easy-To-Trackback History (as in Opera) – a list of previous browsed web pages sorted by last accessed date, so I can track back what I’d read (Nightmare.. if trying to track back the last accessed web page in IE’s history).
  • Custom Styling View (as in Opera) – able to view web page in customized styling. As I always prefer a darker background when I read novels in long hours.
  • Tabbed Browsing (as in Opera, Mozilla) – I love to follow hyperlinks and open them in new pages. I do read multiple pages MUXly at once, sometimes. :P
  • Feeds Reader – (as in Opera, Firefox) blogrolls are growing in my bookmark, I wish to have a feeds reader intergrated into my browser.

As a programmer wannabe, somehow I wish my browser to have extra features:

  • Custom User Scripts (as Greasemonkey) – well, I love the idea where users should able to take control of what will be executed in their own box.
  • Web Development & Debugging Tools (as in Mozilla Suite) – they really helped me so much to during the degree’s thesis project. ;)
  • A Playground to Hack – hack into the codes.. adding features of my own..

So, this evening, I decided to try to setup an *ideal* browser with features described as above. Here’s what I did:

  1. Download & install Firefox 1.0.7
  2. Install a new theme/skin: ifox 1.6
  3. Install extension: Sage 1.3.6 – the feed aggregator
  4. Install extension: Greasemonkey 0.5.3 – the user script manager
  5. Install extension: SessionSaver .2d * nightly 30 – restore last browsing session

And here’s what I have now!

my new firefox screenshot

A browser with Saved Session, EasyToTrack History, Tabbed Browsing, Feeds Reader and a *cute* monkey. ;) Suprisingly, I can use Sage to watch out my gmail too!

Well, I will install some Web Development Tools once I need them, I think. Now, there is still one thing, my new browser cannot view page using custom styling mode (as “User Mode” in Opera). I just couldn’t find the appropriate extension yet, please tell me if you have the extension that just do the job. :)

Permalink 3 Comments

Greetings!

November 12, 2005 at 5:43 am (Undefined)

Hi all,

It was so suprising when I saw a WordPress.com invitation in my gmail just now, and wow.. here I am now, writting my first entry for my first blog. Actually, I have been thinking of setting up a blog recently.. so, this is certainly an early but perfect christmas gift for me. ;)

Anyway, thanks to WordPress.com! :)

(duh.. no spelling check plugin? Hmm, I guess I have to learn my English vocab in a hard way now..)

Permalink Leave a Comment