[crx] Tabs URL Change Event

874 views
Skip to first unread message

Ricky Cook

unread,
Apr 20, 2010, 12:10:46 PM4/20/10
to Chromium-extensions
I'm looking for an event, or other way that I can monitor the status
of a tab's URL (it doesn't need to be a specific tab, it can be all
tabs) so that I can handle an event and modify some data BEFORE the
URL is committed to history (etc).

Currently, I've looked at using chrome.tabs.onUpdated.addListener,
however this does not work for me, as the URL is committed to history
and the event is fired after chrome has done various things (I'm not
entirely sure what, but I'd assume DNS lookups and such).
Unfortunately, this isn't good enough for what I'm looking for.

This may just be for the linux beta that I'm currently developing
with, however I don't see any reason it should be different between
nix and windows. If this is the case, any feedback would be
appreciated :)

Any information on this would be great. To be honest, I would have
thought it would have been the default functionality (considering the
URL field of the onUpdated event) rather than waiting a while...

Thanks in advance,
Ricky

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

Antony Sargent

unread,
Apr 20, 2010, 5:46:03 PM4/20/10
to Ricky Cook, Chromium-extensions
Have you looked at the history API in the recent dev channel build?

Sam Kerner

unread,
Apr 20, 2010, 6:05:33 PM4/20/10
to Ricky Cook, Chromium-extensions
On Tue, Apr 20, 2010 at 12:10 PM, Ricky Cook <fuzzibe...@gmail.com> wrote:
> I'm looking for an event, or other way that I can monitor the status
> of a tab's URL (it doesn't need to be a specific tab, it can be all
> tabs) so that I can handle an event and modify some data BEFORE the
> URL is committed to history (etc).
>
> Currently, I've looked at using chrome.tabs.onUpdated.addListener,
> however this does not work for me, as the URL is committed to history
> and the event is fired after chrome has done various things (I'm not
> entirely sure what, but I'd assume DNS lookups and such).
> Unfortunately, this isn't good enough for what I'm looking for.

Ricky,
Can you give us some background on what you are trying to do? Why
do you need the event before the url is recorded in the browser's
history?

Sam

FuzziBear

unread,
Apr 20, 2010, 11:40:45 PM4/20/10
to Antony Sargent, Chromium-extensions
On Wed, Apr 21, 2010 at 7:46 AM, Antony Sargent <asar...@chromium.org> wrote:
Have you looked at the history API in the recent dev channel build?


I've checked it for something else (opening incognito tabs/windows) but not for this purpose. Thanks for that ^.^ It miiight just work for what I'm looking for.
 
On Wed, Apr 21, 2010 at 8:05 AM, Sam Kerner <ske...@google.com> wrote:
Ricky,
  Can you give us some background on what you are trying to do?  Why
do you need the event before the url is recorded in the browser's
history?

Sam

Well basically, I'm writing an "autocognito" extension that automatically opens windows incognito if you type them into the normal window (based on specific rules that you define). Basically, context-sensitive, automatic incognito activation.

Agim

unread,
Apr 27, 2010, 3:15:16 AM4/27/10
to Chromium-extensions
Im looking to do something similar but i cannot figure out on how to
create a new incognito window. I am not a javascript pro, so i am a
little lost. How can i make a new incognito window on a push of a
toolbar icon?

this is what i have :

<script>
chrome.browserAction.onClicked.addListener(function(window) {

chrome.windows.create({url:chrome.extension.getURL("incognito.html")});
});
</script>

On Apr 20, 11:40 pm, FuzziBear <fuzzibearpa...@gmail.com> wrote:
> On Wed, Apr 21, 2010 at 7:46 AM, Antony Sargent <asarg...@chromium.org>wrote:
>
> > Have you looked at the history API in the recent dev channel build?
>
> >http://code.google.com/chrome/extensions/dev/history.html
>
> I've checked it for something else (opening incognito tabs/windows) but not
> for this purpose. Thanks for that ^.^ It miiight just work for what I'm
> looking for.
>
> On Wed, Apr 21, 2010 at 8:05 AM, Sam Kerner <sker...@google.com> wrote:
>
> > Ricky,
> >   Can you give us some background on what you are trying to do?  Why
> > do you need the event before the url is recorded in the browser's
> > history?
>
> > Sam
>
> Well basically, I'm writing an "autocognito" extension that automatically
> opens windows incognito if you type them into the normal window (based on
> specific rules that you define). Basically, context-sensitive, automatic
> incognito activation.
>
> --
> You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
> To post to this group, send email to chromium-extensi...@chromium.org.
> To unsubscribe from this group, send email to chromium-extensions+unsubscr...@chromium.org.

Derek

unread,
Apr 27, 2010, 7:19:00 PM4/27/10
to Chromium-extensions
I don't think that extensions can access incognito pages unless the
user allows the extension to do that. (Because of security concerns)
Reply all
Reply to author
Forward
0 new messages