// Internet Duct Tape

Why Google Chrome Isn’t My Default Browser

Web Browser Tips & Tricks

Google Chrome has been public for all of about 30 minutes now. I am very impressed with how fast it downloads and installs, with almost no need for user prompts (except to close your web browser so it can import bookmarks/passwords). It’s fast as fast can be.

I can’t get over how fast it is. If you type “about:memory” into the address/search bar you’ll see a memory comparison between Chrome and any other web browsers you’re currently running. It uses so much less memory than Firefox.

Lifehacker has a good round-up of what’s “new” in Chrome, as well as ways to tweak Firefox to get the same features. But I can’t switch to Chrome because of my dependency on multiple profiles and my Firefox extensions.

Profiles?

Multiple profiles let me log into Gmail with different user accounts at the same time, and keep my browsing history and bookmarks separate from my girlfriend who shares the computer with me.

Heck, I keep my blogging related bookmarks separated from my Joe Public bookmarks for my day-to-day email, Facebook, and job related stuff so I can be more productive.

Plugins?

  • I can’t log into my accounts without Password Hasher. Not only do I not use the same password for every account, I don’t even KNOW my password for most accounts.
  • I don’t want to surf the web without Ad-block.
  • I’ve written so many custom Greasemonkey scripts that are unavailable on Chrome.
  • I don’t want to even think about doing any kind of web stuff without Firebug at my beck and call.
  • I’m missing my Delicious tag button for bookmarking.

RSS?

There doesn’t seem to be any RSS auto-discovery in Chrome. I hate how painful it is to subscribe to feeds in Google Reader using Internet Explorer, it looks like it’ll be even worse in Chrome.

Chrome looks very cool, but I think anyone who has been reading Lifehacker for the past few years is going to find they’re missing too much of what is “essential” to them. It’s really too bad, because I’d love to run some Greasemonkey scripts inside of Chrome with it’s better memory debugging. I’m hoping that one of the big brained Googlers figures out a way to transparently run Greasemonkey userscripts so we don’t have the same Firefox vs Opera vs Internet Explorer vs Safari development sinkhole.

On the other hand, Chrome might be the best thing ever for people who use Internet Explorer and aren’t co-dependent on all of Firefox’s wonderful extensions.

Filtering Reddit and Hacker News

Posted in Firefox and Greasemonkey, Reddit, Technology by engtech on May 23, 2008

Social Bookmarking and Social Voting

Giles had a fantastic rant this week that cut to the heart of what’s wrong with all of these “social web application sites”:

People who waste their own time have, in effect, more votes than people who value it – to elevate bad but popular ideas and irretrievably sink independent thinking.

It’s analogous to what’s wrong with the entire massively online roleplaying game genre (eg: World of Warcraft) in that success is a greater factor of the time invested than of skill or talent. Many social web applications add extra features to keep the users interacting with the site, even if this interaction offers dubious value to their lives.

(more…)

Become a Greasemonkey Ninja with jQuery

Posted in Firefox and Greasemonkey by engtech on May 08, 2008

Programming Tips

This is for all the Greasemonkeyers in the house who want to learn how to be much more productive when it comes to hacking together Greasemonkey script by using my favorite Javascript library: jQuery. jQuery will turn a 700 line Greasemonkey script into a 12 line Greasemonkey script. I learned about jQuery through all of the Greasemonkey scripts I created to work with Friend Feed.

This is advanced stuff that is of interest to people writing Javascript. If you’re just a Greasemonkey user then you can safely skip this one.

(more…)

How to Unminify Javascript Code

Posted in Firefox and Greasemonkey, Technology by engtech on May 02, 2008

Programming Tips

As websites have moved away from static pages to interactive updating displays, the modern Greasemonkey hacker has been forced to learn new tricks: namely interacting with the Javascript on a website. Sometimes that’s harder than it looks because the Javascript on the site you want to modify has been minified.

(more…)

Greasemonkey Scripts: Friend Feed Auto-Pagerization, Resharing Links and Even More

Web Browser Tips & Tricks

It’s the last day of my week of Friend Feed and I have 5 more Greasemonkey scripts for you (for a total of 8). I think I’m done writing scripts for Friend Feed for the next little while. I might put together something for importing your Twitter contacts as friends (update: here it is) but if I wait long enough I’m sure they’ll do it as an official service.

As usual you’ll need Firefox and Greasemonkey to use these scripts.

(more…)

Tagged with:

Greasemonkey Script: Filter FriendFeed by Service

Web Browser Tips & Tricks

I’ve sipped the Kool Aid and I’m really liking Friend Feed as a lifestreaming aggregator. One feature that is a bit hard to find is filtering by individual services. I’ve created a Greasemonkey script that sticks a huge bar of icons at the top of the page to make this accessible.

  • It remembers the context you’re in.
    • If you’re browsing within friends, then clicking on the icons will filter by that service on your friends.
    • If you’re browsing within a specific user, then clicking on the icons will filter by that service on that person.
    • If you’re browsing the public timeline, then clicking on the icons will filter by that service for the public timeline.
  • It returns 100 results per page instead of 30.
  • It will automatically update itself if I update the script.

Let me know if you have any problems in the comments.

(more…)

Tagged with: ,

How to Profile Greasemonkey Scripts with Firebug

Posted in Firefox and Greasemonkey, Programming Tools, Technology by engtech on November 13, 2007

Programming Tips

Running performance analysis on Greasemonkey scripts can be a pain in the butt. They aren’t part of a webpage so standard tools for analyzing web sites don’t work… or do they?

The Goal

Profiling Greasemonkey scripts with Firebug

What You’ll Need

  1. Firefox
  2. Greasemonkey
  3. Firebug extension

The Trick

#1: You need to remove all of the Greasemonkey GM_* functions from the script you want to profile. This is easier than it sounds because all of the functions can be performed by plain ‘ole javascript (except for the open in new tab function and register menu command).

#2: You need to embed your Greasemonkey script inside of the running page so you can analyze it with Firebug’s profile tool. I have a function below that can embed a function inside the current web page.

#3: You’ll need to call the function either using unsafeWindow or by embedding a call to the function in the page.

#4: Litter your code with calls to Firebug’s console.profile() and console.time() functions.

Sample Code Template


(function() {
  function embedFunction(s) {
document.body.appendChild(document.createElement('script')).innerHTML =
s.toString().replace(/([\s\S]*?return;){2}([\s\S]*)}/,'$2');
 }

  function myKickassGreasemonkeyScript() {
    console.profile();
    // Put everything you need for your Greasemonkey script in here
    // Don't use any of the GM_* functions!

function kickass() {
      console.time("Block1");
      // Block of code that might take a lot of time
      console.time("Block2");
      // another block of code
      console.timeEnd("Block2");

      console.timeEnd("Block1");

    }

// more cowbell

console.profileEnd();
  }

  embedFunction(myKickassGreasemonkeyScript);
  // Method 1: embed the function call into the current page
  document.body.appendChild(document.createElement('script')).innerHTML = "myKickassGreasemonkeyScript();";
  // Method 2: directly call the function using unsafeWindow
//     window.addEventListener("load", function(e) {
//                   unsafeWindow.myKickassGreasemonkeyScript();
//                   this.removeEventListener('load',arguments.callee,false);
//                 }, false);

 })();

Firebug Tutorial

Michael Sync has a tutorial on using Firebug that describes the console.time() and console.profile() functions. The official website has a nice list of Firebug keyboard shortcuts and a brief description of all the console.* functions.

Related Posts