From the category archives:

Chrome

I just installed a “hello world” Chrome extension from this Chrome Extension HOWTO page. When you surf to www.google.com, the Google logo is replaced with a Lolcat:

Chrome Extension

Here’s how to write your own Google Chrome extension in three steps:

1. Install the developer-channel version of Google Chrome. I don’t know if this is 100% necessary, but new support for plugins will probably show up in the developer version first. You can read instructions on how to switch to the developer version. It takes maybe 3-4 minutes — you basically run a small program to indicate your preference. In case you’re worried that the developer version will crash a lot: I’ve been running the developer version for months and haven’t seen any major issues. The developer version also gets new features (such as pressing “F11″ to get full-screen mode) way before the beta/stable releases of Chrome. I’m using version 2.0.170.0 of Chrome and the “hello world” extension worked fine for me.

2. Read the initial documentation. This is a brand-new feature, but you can already start hacking. Extensions currently have very Greasemonkey-like functionality: you identify which web pages should be modified, plus JavaScript to be added to those pages. By default, the extension’s JavaScript runs after the page loads, but you can specify that the extension’s JavaScript should run before the page loads. Right now, you can only load one JS file, but that could change in the future. You also can’t currently load Cascading Style Sheets (CSS), but that might also change.

I like several things about the extension framework:
- Your plugin has to have a unique identifier (40 digit hexadecimal number). Given an identifier such as “00123456789ABCDEF0123456789ABCDEF0123456″, an extension can include an image such as foo.gif and then easily access that image by using a full path such as “chrome-extension://00123456789ABCDEF0123456789ABCDEF0123456/foo.gif”
- The “content script” (the JavaScript of an extension) gets its own global scope separate from the web page, so you don’t need to worry about global variables conflicting. But you can still get access to the web page’s global variables using the “contentWindow” variable.
- Bundling your extension directory into a “.crx” Chrome Extension file is as simple as running a short Python script.
- Chrome also supports binary NPAPI (Netscape Plugin Application Programming Interface) plugins.

The Chrome extension manifest, which has metadata about your extension such as name, version, etc., looks much simpler to me than how Firefox wants extensions to be packaged. That’s a big plus in my book, because you spend most of your time writing code and not worrying about packaging up your plug-in. On the down side, I didn’t see any support for internationalization, which is one of the benefits of Firefox’s more comprehensive way of packaging up plugins. Another limitation of the current Chrome extension spec is that you can’t do much other than modify pages via JavaScript. And I didn’t see a way to introduce new widgets into the actual “chrome” of the Chrome browser.

3. Try it out! If you’re running the developer version of Chrome, you can install the “hello world” plugin from the extension howto page just by clicking to download the .crx file. Then type “chrome-ui://extensions/” and you’ll see something like this:

Chrome UI extensions

Once you see how it works, just start hacking around and see what happens. Remember, this howto document is only a few days old. I’m sure the Chrome team is thinking about ways to add more functionality to extensions, but the current developer version of Chrome already lets you do a lot of neat things.

One more nice thing: it looks like installing extensions doesn’t require you to restart the browser. :) And a hat-tip to Google OS for pointing out this document.

{ 34 comments }

I was browsing the web when I ran across a statement about Google Chrome that I’ve seen echoed in different ways in the last couple months: “the reality is that Google Chrome is sending basic info about my pc back to them. Is Google the new “Big Brother” looking over everybodies [sic] shoulder…you betch ya.”

I’ve covered the issue of when Chrome communicates on your behalf before, but recent versions of Chrome have made it even easier to understand. Back in early November, the Chrome team addressed this concern:

Privacy section in Options.
We grouped together all of the configuration options for features that might send data to another service. Open the wrench menu, click Options, and select the Under the Hood tab.

And here’s a picture of what the Privacy section looks like:

Chrome privacy options

There’s also a link to this web page with more information on each option, and from that web page you can drill down in more detail into any specific feature that interests you. For example, I opted-in to send usage/crash data to Google to improve future versions of Chrome (that option is off by default).

I like that you can manage Chrome’s communications settings in a centralized location. I don’t consider features such as phishing protection or DNS pre-fetching to be worrisome, but it’s nice to give easy controls to turn features on or off. I don’t expect that will stop people from mistakenly repeating that Chrome is somehow scary or has privacy issues, but for the people that care enough to do the research, they’ll be happy to find out that Chrome lets you choose exactly how and when Chrome sends data to the outside world.

By the way, I think Chrome was released on September 2, 2008, which makes it the four-month birthday of Chrome. Happy birthday to the Google Chrome team!

{ 25 comments }

Living in the cloud

December 19, 2008

in Chrome, Web/Net

I used Wakoopa to track which applications I run on my home Windows machine. Here’s what it says:

Browsing the cloud!

When 96% of your computer time is spent in a browser, that’s living in the cloud. :)

{ 30 comments }

Recently I blogged about what I like about Google Chrome, and Philipp Lenssen asked a good question: “What do you *not* like about Google Chrome?”

Normally when I have suggestions or complaints about a Google product, I talk directly to that team within Google — the Google Chrome team is especially good about listening to feedback. They also provide a very easy way to file bugs or feature requests against Chrome, and they do triage those requests. But I’ve written so positively about Google Chrome in the past that I wanted to show the sort of feedback that I give when I really care about a product.

So here’s what I would change about Google Chrome:

- Hitting the escape key should freeze any animated GIFs on a web page.
This is now filed as a bug: http://code.google.com/p/chromium/issues/detail?id=3690

- Fixed: Middle-clicking on a tab is a fast, easy way to close tabs. But it can’t currently be aborted — what if you click your middle button on a tab and then realize that you don’t want to close that tab? On Firefox you can move your mouse off the tab before releasing the button to abort closing the tab. That doesn’t work on Chrome right now.

Update: Peter Kasting, a Chromium developer, stopped by in the comments and mentioned that the 1.0.154.39 dev channel release adds this functionality. The fact that a team member is willing to wade into the comments and address specific complaints/questions is one of the factors that makes me think Chrome will be a successful project.

- If I start typing “Google webmaster blog” into the Omnibox, it offers to search Google for “webmaster blog”:

Google quicksearch

I’m a power user, so I want a way to turn that quicksearch off. I type a lot of searches of the form [Google X Y Z] but that doesn’t mean I want to search on Google for [X Y Z].

Update: Solved. Barry Hunter made this observation:

It is possible to turn off, I also found it very annoying. Goto Options, and on the Basics tab, click the ‘Manage’ in Default Search bit. You probably have a ‘Google’ listed in ‘Other Search Engines’ – delete that – which was probably imported from Firefox via an original OpenSearch description.
(if you dont, look for an entry with ‘google’ in the keyword column)

Thanks, Barry!

- Chrome doesn’t recover submitted form data as well as Firefox if you have to click the back button.
Follow this bug here: http://code.google.com/p/chromium/issues/detail?id=2636

- There’s a weird interaction between WordPress and at least the current dev version of Chrome. If I select some text and click the “link” button when writing a blog post, I get a pop-up that already contains “http://”. The text “http://” should be selected so that I can delete it or paste over it easily. Right now I have to select the text and then delete it. This is really annoying.
Chrome 2 fixed this, but it’s broken again in Chrome 2.0.162.0. Filed a bug: http://code.google.com/p/chromium/issues/detail?id=7754

- One thing I love about Chrome is that you can type ‘t’ in the omnibox and it will suggest something reasonable like “techmeme.com” and you can just hit return to go there. But if you’ve been to a hostname that exists (e.g. if you’ve visited a valid internal server at http://t/ ) then you have to type ‘te’ before the “techmeme.com” suggestion comes up, because Chrome assumes that you want the server with that name:

Chrome omnibox autocomplete

I want to be able to right-click and delete any Omnibox suggestion. Then ‘t’ will suggestion techmeme.com again. :)

Update: Solved, again thanks to Peter Kasting in the comments:

Hit shift-delete on the item (this also works in Firefox). Caveat: You have to arrow to the item (that means that if the item is the default selection, arrow away, then back). This is to avoid conflation with the system level shift-delete “cut” shortcut.

- I’m a weirdo, but I want the ability to add user styles so that I can (say) highlight nofollow links. So I want the equivalent of userContent.css that Firefox offers.
Follow the bug to add user stylesheets here: http://code.google.com/p/chromium/issues/detail?id=2393

Update: Hacky workaround. Thanks to a friend for pointing out how to do this. This is a temporary stopgap and may void your warranty. Don’t complain if this breaks anything. Here’s how to do it:

1) Sign up for the dev channel of Chrome.
2) Create a directory C:\scripts\ and save http://blog.bubble.ro/wp-content/uploads/2007/07/nofollowhighlight.user.js into C:\scripts\ (the path is deliberately ugly to remind you that this is a temporary workaround).
3) Run Chrome with –enable-greasemonkey (make sure to close all Chrome instances so you get a fresh invocation of Chrome when you start). To do this, right-click on the Chrome shortcut and select “Properties”. In the “Target:” text box, add “–enable-greasemonkey” at the very end of the line (note that it’s two hyphens before “enable-greasemonkey”). It should look like this:

Chrome nofollow usercontent.css

Now you can see nofollow links!

- A friend pointed this one out to me: If you’re using a proxy url and get on a VPN, Chrome can take 20-30 seconds to refresh/reload the proxy script. I think Chrome might use a Windows-wide service, which is why it takes a while? In Firefox you can click a “Reload” button to force a refresh of the proxy configuration URL.

- Chrome doesn’t have that many options now, but eventually I’d love the equivalent of Firefox’s about:config method of changing settings.

- I don’t know if this is a Chrome issue, but when I use Chrome with Twitter, copying and pasting urls/text in the text box can be weird sometimes, e.g. you copy/paste urls and it copy/pastes from a different location in the text box. I don’t know how to describe it, but people who use Chrome and Twitter a lot might have seen this too.

Added: Here’s how to reproduce the Twitter/Chrome weirdism. Open http://www.cnn.com/ in one tab in Chrome. Copy the url. Open Twitter in another tab. In the “What are you doing?” box, type “One two three: “. Then paste the url “http://www.cnn.com/ ” into the box. Then type “four five six seven eight nine ten eleven twelve fourteen.” into the text box. Now click on the text between “twelve” and “fourteen” (as if you were going to add a new word between them). Instead, the cursor position will move to just before the “http://www.cnn.com/” text. If you double-click between the twelve and fourteen, the “http” will be selected. It looks like this:

Twitter Chrome bug

One weird thing is that this bug only fires when you have two lines filled in that Twitter text box. If the text was “One two three: http://www.cnn.com/ four five six seven eight nine ten eleven.” (which fits on one line) then you don’t see this issue. I also didn’t see this issue in Firefox.
Filed a bug for this issue: http://code.google.com/p/chromium/issues/detail?id=7755

Do you have Google Chrome nitpicks or things you would change? Assume that the team has heard the feedback on
- Mac and Linux versions
- extensions
- perhaps better integration (Google Toolbar-like features, or Google Bookmarks)

and that they don’t need to hear that feedback. Are there other annoyances or things that you would change about Google Chrome? The Chrome team is a top-notch group of people in my experience and they release new dev channel versions of Chrome almost every week, so I’d be curious if you’ve run across specific bugs, annoyances, or niggly things that might be easy to change.

(And just to be clear, I love and use Google Chrome all the time. I didn’t mind posting this because I know the Chrome team is so strong that they can handle suggestions from a passionate user.)

{ 170 comments }

Browser Market Share?

November 25, 2008

in Chrome, Weblog/blog

I hadn’t looked at my browser marketshare in a while, so I fired up Google Analytics:

Browser marketshare

Rough browser numbers are

Firefox 57.58%
IE 26.07%
Safari 6.48%
Chrome 5.11%
Opera 2.35%
Mozilla 1.44%
SeaMonkey 0.48%
Mozilla Compatible 0.18%
Konqueror 0.13%
Camino 0.04%

OneStat says that they see 0.54% share for Google Chrome. Net Applications provides an hour-by-hour graph, which is nice, but they hardwired it to look for the string “Chrome 0.2″ when Chrome is on version 0.3 or 0.4 by now. Just eyeballing the Chrome 0.3 version stats, it looked like about 0.85% market share according to Net Applications. Hey Net Applications folks, any chance you’d be willing to roll up all the Chrome versions into your hourly report?

I hadn’t realized that Internet Explorer usage had dropped so low for my site (~26%). What does your browser marketshare stats look like for the last month or so for your site(s)?

P.S. Stephen Shankland writes about switching to Google Chrome because of the speed, while ExtremeTech also concluded that Chrome is speedy. And if you haven’t seen it, there’s a new version of Chrome (0.4.154.25) that adds a couple nice features:

Bookmark manager with import/export.
Use the ‘Customize and control Google Chrome’ (wrench) menu to open the Bookmark manager. You can search bookmarks, create folders, and drag and drop bookmarks to new locations. The Bookmark Manager’s Tools menu lets you export or import bookmarks.

Privacy section in Options.
We grouped together all of the configuration options for features that might send data to another service. Open the wrench menu, click Options, and select the Under the Hood tab.

Personally, I run the dev channel version of Chrome because I like to see what cool features are coming soon. I think the dev channel has averaged weekly updates, which is really nice because you can literally watch plug-in fixes and other improvements arrive every few days. It’s wild to see client software updated that often instead of every few months.

Update, 11/28/2008: Somehow I missed the getclicky.com browser marketshare stats from 60K+ sites. They peg Chrome at 1.55%, with a little bit of 1.6% to 1.7% in the last week or so.

{ 164 comments }