I created a content script this evening. If it helps you refine the
doc, here are the things I ran into. I was using a nightly build
(11818):

- I didn't expect, and was thankful for the manifest validation error
messages. I wonder where these should go.
- Sometimes the script seemed to fail to load - particularly after
hitting reload.
- Couldn't see JS errors for the extension in the inspector, but I
think the inspector is pretty hosed regardless.
- Because of both of the above, I always just restarted Chrome
whenever I made any changes, setting my homepage to my test page.
- I missed the bit about the ID being a 40-digit hex number and spent
a long time trying all sorts of stuff with my name in it.
- I also missed the bit about Python 2.6 and spent a reasonable amount
of time figuring out how to install the non-default dep (SimpleJSON)
in my Python 2.5, as the ez_setup only pretended to work.
- I put chromium_extension.py in the same dir as the files. It then
included itself in the CRX.
- The doc isn't clear about what to do with the CRX. Dragging it onto
Chrome downloads it, and setting Chrome as the default opener for the
filetype results in an infinite tab-spawning download loop (opening it
downloads it again, after which it autoopens : repeat). If it's not
implemented, can we say so?
- Either way, you may find it here:
<http://glenmurphy.com/tmp/portal.crx> OR
<http://glenmurphy.com/tmp/portal.zip> (5KB) - it's a version of that
content-clipping script we wrote a few years ago. alt+drag to create,
double-click to spawn.
- I was worried that all of the content-scripting I'd forgotten would
come and bite me, but apart from brief confusion over scope
('document' working, but 'window' requiring 'contentWindow'), writing
the code itself was easy as pie.

xox, extensions team, xox.
Glen


On Mon, Mar 16, 2009 at 4:50 PM, Aaron Boodman <[email protected]> wrote:
> PS, there are also some sample extensions as attachments at the bottom
> of the doc.
>
> - a
>
> On Mon, Mar 16, 2009 at 4:46 PM, Aaron Boodman <[email protected]> wrote:
>> I've created a starter document for people wanting to create Chromium
>> extensions:
>>
>> http://dev.chromium.org/developers/design-documents/extensions/howto
>>
>> Right now extensions can only really contain content scripts, so that
>> is all this doc covers. But we'll be expanding it over time as more
>> features develop.
>>
>> - a
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to