Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Chrome Extension Development, By Practical Example (github.com/bcoe)
101 points by BenjaminCoe on Jan 20, 2012 | hide | past | favorite | 10 comments


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.


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?


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.


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


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.


Throwing mine out there, too--for spoofing your user-agent string:

https://github.com/jugglinmike/chrome-user-agent


Hey Mike, just FYI this is now available in DevTools: http://cache.gyazo.com/1c4bc26914b409a85884147d6f9fec03.png


Similarly y'all might find my Chrome extension for HN interesting.

https://github.com/tkahn6/hn-newcomments-chrome

And if you're interested in using it:

https://chrome.google.com/webstore/detail/kikfikaiccdaabdilg...


"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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: