top | item 3491728

Chrome Extension Development, By Practical Example

101 points| BenjaminCoe | 14 years ago |github.com | reply

10 comments

order
[+] bsimpson|14 years ago|reply
The problem with extension development is that each browser does it differently.

If you abstract away the browser-specific API, it's not too hard to write a cross-browser extension. Here's one that runs on both Chrome and Safari:

http://code.google.com/p/marking-menu-js/source/browse/#svn%...

Notice how it implements the important bits of Chrome's extension API in terms of Safari's:

http://code.google.com/p/marking-menu-js/source/browse/trunk...

That allows you to easily port Chrome extensions over.

[+] candeira|14 years ago|reply
It seems to me there is a need for a browser extension framework/polyfill that allows you to write code once, deploy to any browser. Would that even be possible?
[+] atdt|14 years ago|reply
Hey, cool! The source code for my Chrome extension is also on GitHub:

https://github.com/atdt/chrome-force-media-type/blob/master/...

The Makefile might be interesting to you. It's very simple, but it automates an annoying part of the development cycle.

[+] zakj|14 years ago|reply
Thank you for the pack target! I should have known Chrome would have a command-line flag for this, but never thought to check.

My extension is also on GitHub: https://github.com/cabin/linkhunter

[+] BenjaminCoe|14 years ago|reply
Cool thanks :) I was trying to consolidate some of the stuff I'd learned building the extension for http://attachments.me into a simple example.
[+] zobzu|14 years ago|reply
"Why Create a Chrome Extension?

    It's a great way to integrate seamlessly with a third-party site like Gmail.
        It in turn solves the "other site" problem, i.e., your customers don't want to go to yet another website.
    The Chrome Web Store is a wonderful source of traffic.
    All your friends are doing it.
"

i find the readme scary. it encourages closing the web.

the rest's good - but - the intention's bad.

[+] BenjaminCoe|14 years ago|reply
I agree in principal -- I'm not advocating that the whole internet be centralized to a few major websites. Having said that, integrating with a site like Gmail can be a good way for a small fish to get some traction.