Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Extensions HOWTO doc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aaron Boodman  
View profile  
 More options Mar 16, 7:46 pm
From: Aaron Boodman <a...@chromium.org>
Date: Mon, 16 Mar 2009 16:46:56 -0700
Local: Mon, Mar 16 2009 7:46 pm
Subject: [extensions] Extensions HOWTO doc
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Boodman  
View profile  
 More options Mar 16, 7:50 pm
From: Aaron Boodman <a...@chromium.org>
Date: Mon, 16 Mar 2009 16:50:12 -0700
Local: Mon, Mar 16 2009 7:50 pm
Subject: Re: [extensions] Extensions HOWTO doc
PS, there are also some sample extensions as attachments at the bottom
of the doc.

- a


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[extensions] Extensions HOWTO doc" by Glen Murphy
Glen Murphy  
View profile  
 More options Mar 17, 1:52 am
From: Glen Murphy <g...@chromium.org>
Date: Mon, 16 Mar 2009 22:52:26 -0700
Local: Tues, Mar 17 2009 1:52 am
Subject: Re: [chromium-dev] Re: [extensions] Extensions HOWTO doc
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Boodman  
View profile  
 More options Mar 17, 2:54 am
From: Aaron Boodman <a...@chromium.org>
Date: Mon, 16 Mar 2009 23:54:49 -0700
Local: Tues, Mar 17 2009 2:54 am
Subject: Re: [chromium-dev] Re: [extensions] Extensions HOWTO doc

On Mon, Mar 16, 2009 at 10:52 PM, Glen Murphy <g...@chromium.org> wrote:
> 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):

Thanks a lot for the feedback!

> - I didn't expect, and was thankful for the manifest validation error
> messages. I wonder where these should go.

Whee. I love error messages and am glad you found them helpful. I also
don't know where they should go yet, but I don't want to remove them
until we have a better place because they are so useful.

> - Sometimes the script seemed to fail to load - particularly after
> hitting reload.

That is weird, I've never noticed that. The only thing that I can
imagine is that because the reload is asynchronous, you were beating
it, but that seems hard to believe. Did you notice that the second
time you refreshed you'd see your changes?

> - Couldn't see JS errors for the extension in the inspector, but I
> think the inspector is pretty hosed regardless.

What do you mean? JavaScript errors from content scripts? Or other
types of extension errors? You should definitely see errors, and I
know I've seen them before.

> - Because of both of the above, I always just restarted Chrome
> whenever I made any changes, setting my homepage to my test page.

That sucks, I really want a edit-reload development experience.

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

Yeah, we should just remove the requirement for the ID altogether from
the development mode.

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

We want to add a feature to Chrome itself where you can just use it to
create the package.

> - 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?

Dragging it onto Chrome should download it, then install it, but there
is no UI letting you know that anything happened right now, and it
also doesn't work correctly when you're using a Chrome that isn't your
default installation.

I will update the doc and try and fix these issues.

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

Both files appear to be invalid??

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

'window' shouldn't require contentWindow, unless you want to access
the content window's global scope, which doesn't seem necessary for
what you're trying to do (but I can't remember exactly what feature
you're talking about).

- a


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Boodman  
View profile  
 More options Mar 17, 4:00 am
From: Aaron Boodman <a...@chromium.org>
Date: Tue, 17 Mar 2009 01:00:30 -0700
Local: Tues, Mar 17 2009 4:00 am
Subject: Re: [chromium-dev] Re: [extensions] Extensions HOWTO doc
Extensions comrades,

Here are my takeaways on what we can improve based on Glen's experience:

* Make the id field optional for development mode
* We should add a temporary alert box saying "success" after
installation of a crx file, until we have a proper install UI
* We should reuse the current process when a crx file is opened by a
chrome instance (we talked about this today)
* We should add some easy way to create a crx file using chrome.exe or
a website or something

- a


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Kay  
View profile  
 More options Mar 17, 10:04 am
From: Erik Kay <erik...@chromium.org>
Date: Tue, 17 Mar 2009 07:04:10 -0700
Local: Tues, Mar 17 2009 10:04 am
Subject: Re: [chromium-dev] Re: [extensions] Extensions HOWTO doc

On Tue, Mar 17, 2009 at 1:00 AM, Aaron Boodman <a...@chromium.org> wrote:

> Extensions comrades,

> Here are my takeaways on what we can improve based on Glen's experience:

> * Make the id field optional for development mode
> * We should add a temporary alert box saying "success" after
> installation of a crx file, until we have a proper install UI
> * We should reuse the current process when a crx file is opened by a
> chrome instance (we talked about this today)
> * We should add some easy way to create a crx file using chrome.exe or
> a website or something

Agree with these points, but here's a slightly less annoying cheat for the
install UI:
- open up raf's extension ui page in a tab and highlight the newly installed
extension


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glen Murphy  
View profile  
 More options Mar 17, 12:44 pm
From: Glen Murphy <g...@chromium.org>
Date: Tue, 17 Mar 2009 09:44:33 -0700
Local: Tues, Mar 17 2009 12:44 pm
Subject: Re: [chromium-dev] Re: [extensions] Extensions HOWTO doc

>> - Sometimes the script seemed to fail to load - particularly after
>> hitting reload.

> That is weird, I've never noticed that ... Did you notice that the second
> time you refreshed you'd see your changes?

After hitting reload, the script just appeared to not run (I had a
bunch of contentWindow.console.log messages to let me know if it did).
Very occasionally it would load, and I would see my changes.

I could never get an alert() to work, either alert, window.alert, or
contentWindow.alert(); though I'll admit that I didn't try very hard,
and the times I tried it may have overlapped with the times where the
script failed to load.

>> - Couldn't see JS errors for the extension in the inspector, but I
>> think the inspector is pretty hosed regardless.

> What do you mean? JavaScript errors from content scripts? Or other
> types of extension errors? You should definitely see errors, and I
> know I've seen them before.

In that case, I blame the nightly I was using - it wasn't doing a very
good job of showing errors from webpages either. Maybe this explains
the load-fail error as well.

>> - The doc isn't clear about what to do with the CRX. Dragging it onto
>> Chrome downloads it, and ...

> Dragging it onto Chrome should download it, then install it, ... and it
> also doesn't work correctly when you're using a Chrome that isn't your
> default installation.

Ah, this was a nightly that was not my default Chrome - dragging it
onto that nightly Chrome gave me a "Windows doesn't know what to do
with this file" after it 'downloaded', so I guess I missed an
associations step.

> Both files appear to be invalid??

The .zip was the .crx renamed to .zip. I have manually created a new
.zip and uploaded it over the old one. Not sure why the .crx was
invalid - I didn't get any error messages when I created it, and both
files opened fine in 7-zip; maybe this explains why it didn't install,
either.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google