Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is it possible to get the text from browser location bar *before* navigation (e.g. not location.href)

0 views
Skip to first unread message

Alex Bird

unread,
May 8, 2008, 12:06:40 PM5/8/08
to
Hi,
Possibly I am searching for the wrong thing, but my googling has been
futile.

I want to get the contents of the browser (FF) location bar *before* I
have navigated to that location. location.href / window.location have
not been set at this point.

Scenario: I want to be able to paste an address in, and hit a button
to change certain parameters and navigate to the page. I can do this
by popping up a dialogue box and pasting the address in, but that
isn't very clean, and precludes having several modifier bookmarklets.

This could help my debugging speed immensely!

Cheers

Thomas 'PointedEars' Lahn

unread,
May 8, 2008, 1:35:16 PM5/8/08
to
Alex Bird wrote:
> Possibly I am searching for the wrong thing, but my googling has been
> futile.

A quite pointless statement without telling what keywords you have used.

> I want to get the contents of the browser (FF) location bar *before* I
> have navigated to that location. location.href / window.location have
> not been set at this point.

You can't. This code would run in the sandbox which, literally, prevents
you from spying on the property.

> Scenario: I want to be able to paste an address in, and hit a button
> to change certain parameters and navigate to the page. I can do this
> by popping up a dialogue box and pasting the address in, but that
> isn't very clean, and precludes having several modifier bookmarklets.

I don't follow. As you can paste the address and hit a button, you can type
the keyword of the bookmarklet and paste the address as its parameter. You
can have any number of modifier bookmarklets this way. I currently use
about 100 of them.


HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300...@news.demon.co.uk>

Alex Bird

unread,
May 8, 2008, 6:08:04 PM5/8/08
to
On May 8, 6:35 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:

> Alex Bird wrote:
> > Possibly I am searching for the wrong thing, but my googling has been
> > futile.
>
> A quite pointless statement without telling what keywords you have used.

You're weird.

Thanks for answering the question though,

A.

Thomas 'PointedEars' Lahn

unread,
May 9, 2008, 10:15:22 AM5/9/08
to
Alex Bird wrote:

> [...] Thomas 'PointedEars' Lahn [...] wrote:
>> Alex Bird wrote:
>>> Possibly I am searching for the wrong thing, but my googling has been
>>> futile.
>> A quite pointless statement without telling what keywords you have used.
>
> You're weird.

In this place, you are. See http://catb.org/~esr/faqs/smart-questions.html

> Thanks for answering the question though,

You're welcome.


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16

0 new messages