The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

26. October 2011, 00:02:49

devilspartner

Posts: 2

Accessing the address bar

Hi guys!

First message and A LOT of questions, but let's start with this one: is there a way through the object hierarchy that I could reach the contents of the address bar of a window? And manipulate them? By the way, where could I find more information about this model? Let's say, I would like to access the address bar of a window, the same way I access the toolbar with this sentence... "opera.contexts.toolbar"

You will excuse me if this sounds weird or it's already replied, since I have been unable to find any tip to start with (maybe I should be looking for a different thing).

Any tip will be greatly appreciated.

Cheers,
DP

26. October 2011, 01:12:48

Mikanoshi

Posts: 6

Opera extensions have very limited access to browser's interface, they extend and don't intrude. Kind of security policy... So the only way to "modify" address bar is document.location ))

26. October 2011, 05:39:31

spadija

Posts: 1643

... or window.history, which really just lets you change the URL with JavaScript so that sites with dynamically loaded pages (e.g. github) work nicely.

26. October 2011, 18:54:31

devilspartner

Posts: 2

I see the point, guys. Thanks.

My intention goes actually beyond retrieving the URL of the visited website: what I want is to add an interactive button next to the URL (ie, just like the RSS button), but for what Mikanoshi says I presume it won't be possible (also haven't found any documentation) so I will keep working with the standard toolbar. Anyhow, I like the aproach ("extend and don't intrude).

BTW, nice tip Spadija.

My gratitude for the answers,
DP

14. September 2012, 09:19:37

Koldice

Posts: 70

Not possible? This has nothing to do with security. An addon should be able to add things to anywhere you want.

We're never gonna have serious extensions for Opera if we're so limited...

Forums » Dev.Opera » Opera Extensions Development Discussions