On Sun, Sep 13, 2009 at 4:21 PM, Aaron Boodman <[email protected]> wrote:
> To help understand the issues you faced, I tried debugging your
> extension a bit to fix the flakiness. I made some minor adjustments
> and it seems to be working well now. I also packed it up (attached).
> I've sent the pem file to you separately.

You are awesome!

>> - Weight.
>> This feels like a *lot* of code (content script, page action,
>> background page, manifest, message ports) just to make a bookmarklet
>> appear in the URL bar.  I wonder if there's a place for a "simple"
>> extension API for bookmarklet-y sorts of things?
>
> The majority of the complexity here is setting up the content script
> and the messaging to it. We have a code review in progress now that
> adds a programmatic script execution function to extensions. So from
> your background page, you could do something like:
>
> chrome.tabs.executeScript({source: "config variables..."});
> chrome.tabs.insertCSS({file: "readability/readability.css"});
> chrome.tabs.insertCSS({file: "readability/readability-print.css"});
> chrome.tabs.executeScript({ file: "readability/readability-print.js"});
>
> With that, it would just be the manifest, hooking the page action
> events, and then running this script. This seems like about the right
> amount of complexity to me, without having to add any special cases.

That seems just right for what I wanted, too.  LGTM.

> All the errors should be printing their line numbers, except for
> errors from asynchronous APIs, which should print the name of the
> function you called (We could even get the line numbers of those
> errors, but it doesn't come for free). If you are seeing a case where
> this isn't happening, please give details.

Yeah, sorry for the terrible bug report.  Next time I play with it
I'll take screenshots etc.

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

Reply via email to