[Greasemonkey] RE: Greasemonkey Digest, Vol 14, Issue 14
Terry Brooks
tabrooks at u.washington.edu
Sun Jan 8 11:10:53 EST 2006
Thanks!
Terrence A. Brooks
The Information School
The University of Washington
Box 352840
Seattle, WA 98195-2840
Voice: 206 546-5707
Fax: 206 616-3152
HTTP://faculty.washington.edu/tabrooks/
-----Original Message-----
From: greasemonkey-bounces at mozdev.org
[mailto:greasemonkey-bounces at mozdev.org] On Behalf Of
greasemonkey-request at mozdev.org
Sent: Saturday, January 07, 2006 11:37 PM
To: greasemonkey at mozdev.org
Subject: Greasemonkey Digest, Vol 14, Issue 14
Send Greasemonkey mailing list submissions to
greasemonkey at mozdev.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mozdev.org/mailman/listinfo/greasemonkey
or, via email, send a message with subject or body 'help' to
greasemonkey-request at mozdev.org
You can reach the person managing the list at
greasemonkey-owner at mozdev.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Greasemonkey digest..."
Today's Topics:
1. Re: Keyword: URLs not being detected? (Dave Land)
2. Re: Cross-script configuration data sharing (Matt Sargent)
3. Cross-script configuration data sharing (Devin)
4. Re: Keyword: URLs not being detected? (Dave Land)
5. Re: Cross-script configuration data sharing (Gareth Andrew)
6. Script firing twice? (Dave Land)
7. Re: Script firing twice? (Jeremy Dunck)
8. Re: Script firing twice? (Dave Land)
9. Re: Script firing twice? (Jeremy Dunck)
10. Re: Script firing twice? (Lenny Domnitser)
11. Re: Script firing twice? (chris feldmann)
----------------------------------------------------------------------
Message: 1
Date: Sat, 7 Jan 2006 10:23:07 -0800
From: Dave Land <land at aol.com>
Subject: Re: [Greasemonkey] Keyword: URLs not being detected?
To: greasemonkey at mozdev.org
Message-ID: <97BBE521-C880-4071-9075-3AB9DEAF39E2 at aol.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Jan 6, 2006, at 5:10 PM, Hans Schmucker wrote:
> I don't think this is necessary anymore... I'm frequently using //
> ==UserScript==
> // @name Google Massive Gallery Creator
> // @namespace Hans Schmucker (hansschmucker at gmail.com)
> // @description Creates a large Thumbnail collection from a given
> Google Image Search
> // @include http://images.google.*/*
> // ==/UserScript==
>
> with keyword gi
> http://images.google.com/images?q=%
> s&imgsz=xxlarge&svnum=100&hl=en&lr=&start=0&sa=N&filter=0
>
> and it works allright... so I think you can simply remove your
> redirecter script and everything should work fine using 0.64 and
> Firefox 1.5
Thanks for the instantomatic reply, but I wonder if we're talking about
the same thing...
There are two things called "keywords" in Firefox:
- Bookmark keywords
This is what I think you're talking about: type "gs search
terms" in the urlbar on my browser, and it goes to
http://google.com/search?q=search%20terms
This works just fine for me, too.
- The thing that triggers the keyword.URL preference
This is what I'm talking about: type "search terms" in the
urlbar on my browser and it goes to
keyword:search terms
But, because of the way the keyword mechanism works in Firefox,
instead of the location.href being set to the contents of the
keyword.url preference with the search terms appended, it
contains "keyword:search terms"
document.location.protocol = "keyword:"
document.location.href = "keyword:search terms"
Yet scripts that rely on "@include keyword:*" don't trigger.
I admit that I'm just being lazy... I could just learn to type "gs"
before my search terms, but I am curious as to why this may have changed
between 1.0.7+0.5.3 and 1.5+0.6.4.
Dave
------------------------------
Message: 2
Date: Sat, 07 Jan 2006 12:33:35 -0600
From: "Matt Sargent" <matt.sargent at earthlink.net>
Subject: Re: [Greasemonkey] Cross-script configuration data sharing
To: greasemonkey at mozdev.org
Message-ID: <43BFB51F.18657.688B29 at matt.sargent.earthlink.net>
Content-Type: text/plain; charset=US-ASCII
I agree completely. Making existing data less secure isn't the way to
go. Since most of the people installing scripts don't have the expertise
to determine if a script is doing something malicious, the security
needs to be built into Greasemonkey. Greasemonkey doesn't need any more
security black eyes.
On 7 Jan 2006 at 17:08, BachusII wrote:
> >
> >
> >On Sat, 2006-01-07 at 10:53 +0100, BachusII wrote:
> >
> >
> >I think keeping your data safe from other scripts is a non-issue. I
> >think the only problem would be if you could have an accidental
> >conflict, otherwise scripts accessing other scripts data is a
> >feature, in my opinion (meta-user-scripts anyone?).
> >
> >Gareth.
> >
> Take the Mark Pilgrims Magic Line user script for instance. Basically
> it's a GM copy of your browser history. Would you want any user script
> to be able to take that data and phone home?
>
> Keep the data separated by script. If you /want/ to share the data
> with other scripts, fine, use a different datasphere. I suggested a
> new datasphere at library level, one at a meta level is certainly
> possible.
>
> If you don't want to share your data, it's a default.
> If you do want to share your data, look at these spiffy methods which
> enable you to do so. If you don't want to share data but end up
> sharing anyway, you used the wrong method(s).
>
> But that's just my opinion.
> And now if you'll excuse me, I intend to find out why my previous post
> did end up in my inbox and the one you replied to didn't.
>
>
>
> Groeten
> BachusII at gmail.com
>
>
> Evil Geniuses in a nutshell, Appendix A. "Poetry for the Web".
>
> "Our yellow sun yields to the dark,
> as I begin my web-based lark,
> flowing, turning, through the pipe
> I grep for text and dump the hype...
>
> But as I ride the fibre trail,
> I test my faith as I read my mail.
> Even as my bandwidth fattens,
> I question life and 1-Click patents..
>
> Although I ask, and though I query,
> I know the truth I grok the theory.
> Life is a multimedia of sins,
> so he who collects the most porn wins."
>
> (http://ars.userfriendly.org/cartoons/?id=20000307)
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
------------------------------
Message: 3
Date: Sat, 07 Jan 2006 12:13:34 -0800
From: Devin <Devin.Cook at gmail.com>
Subject: [Greasemonkey] Cross-script configuration data sharing
To: greasemonkey at mozdev.org
Message-ID: <43C020EE.4070803 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
One possibility (which I almost hate to mention) is to mark properties
as "public".
This could be done by placeing a '!' or some other marker as the first
char of the property name.
Then, any script in the same namespace can read or write it.
for example:
GM_setValue('XPos','1'); // Private
GM_setValue('!XPos','1'); // Public
-- Devin
------------------------------
Message: 4
Date: Sat, 7 Jan 2006 12:32:50 -0800
From: Dave Land <land at aol.com>
Subject: Re: [Greasemonkey] Keyword: URLs not being detected?
To: greasemonkey at mozdev.org
Message-ID: <A3A0DCF0-F2ED-4F45-8CE4-FA4C5C79A947 at aol.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Hello, friends,
I may have created confusion by using the wrong terminology...
"keyword" = a string attached to a bookmark that functions as an alias
to that bookmark, with %s parameter substitution.
"location bar search" = the thing I was talking about, which, sadly,
uses the preference "keyword.URL", leading to the confusion in terms.
So let me ask a different question: should "@import keyword:*" work?
Dave
------------------------------
Message: 5
Date: Sat, 07 Jan 2006 22:52:37 +0000
From: Gareth Andrew <freega at freegarethandrew.org>
Subject: Re: [Greasemonkey] Cross-script configuration data sharing
To: greasemonkey at mozdev.org
Message-ID: <1136674357.18018.3.camel at localhost.localdomain>
Content-Type: text/plain
Hmmm,
Consider my mind completely changed on this one.
Gareth.
On Sat, 2006-01-07 at 17:08 +0100, BachusII wrote:
> >
> >
> >On Sat, 2006-01-07 at 10:53 +0100, BachusII wrote:
> >
> >
> >I think keeping your data safe from other scripts is a non-issue. I
> >think the only problem would be if you could have an accidental
> >conflict, otherwise scripts accessing other scripts data is a
> >feature, in my opinion (meta-user-scripts anyone?).
> >
> >Gareth.
> >
> Take the Mark Pilgrims Magic Line user script for instance. Basically
> it's a GM copy of your browser history. Would you want any user script
> to be able to take that data and phone home?
>
> Keep the data separated by script. If you /want/ to share the data
> with other scripts, fine, use a different datasphere.
> I suggested a new datasphere at library level, one at a meta level is
> certainly possible.
>
> If you don't want to share your data, it's a default.
> If you do want to share your data, look at these spiffy methods which
> enable you to do so.
> If you don't want to share data but end up sharing anyway, you used
> the wrong method(s).
>
> But that's just my opinion.
> And now if you'll excuse me, I intend to find out why my previous post
> did end up in my inbox and the one you replied to didn't.
>
>
>
> Groeten
> BachusII at gmail.com
>
>
> Evil Geniuses in a nutshell, Appendix A. "Poetry for the Web".
>
> "Our yellow sun yields to the dark,
> as I begin my web-based lark,
> flowing, turning, through the pipe
> I grep for text and dump the hype...
>
> But as I ride the fibre trail,
> I test my faith as I read my mail.
> Even as my bandwidth fattens,
> I question life and 1-Click patents..
>
> Although I ask, and though I query,
> I know the truth I grok the theory.
> Life is a multimedia of sins,
> so he who collects the most porn wins."
>
> (http://ars.userfriendly.org/cartoons/?id=20000307)
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
------------------------------
Message: 6
Date: Sat, 7 Jan 2006 17:37:38 -0800
From: Dave Land <land at aol.com>
Subject: [Greasemonkey] Script firing twice?
To: Greasemonkey Discussion <greasemonkey at mozdev.org>
Message-ID: <B07F3DC4-A236-4C82-A3FE-6E9C32B94E91 at aol.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Folks,
To learn about GM_setValue/getValue, I cooked up an idea for a script
that would count how "lucky" I really am when using Google by counting
how often I click the 1st, 2nd, 3rd (and so forth) links...
So I started, as I always do, by writing a brain-dead simple script that
just writes something using setValue, reads it back using getValue and
logs what it read...
Oddly, I get two logged events, about 120 milliseconds apart from the
following script:
// ==UserScript==
// @namespace http://www.ryanland.com/greasemonkey
// @name How Lucky?
// @include *.google.tld/*
// @description How lucky ARE you feeling?
// ==/UserScript==
now = new(Date);
milli = now.getMilliseconds();
GM_setValue("howlucky",milli);
GM_log("howlucky = " + GM_getValue("howlucky"));
/* -- end -- */
Why does it fire twice?
I turned off all scripts that target Google or "*" to see if one of them
was doing a reload or something, but that doesn't seem to be it.
It's probably something stupid that one of my fine GreaseMonkey friends
will point out in an instant.
Dave
------------------------------
Message: 7
Date: Sat, 7 Jan 2006 20:57:57 -0600
From: Jeremy Dunck <jdunck at gmail.com>
Subject: Re: [Greasemonkey] Script firing twice?
To: greasemonkey at mozdev.org
Message-ID:
<2545a92c0601071857k4e329c74yd3ecb0114a96700e at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 1/7/06, Dave Land <land at aol.com> wrote:
> Oddly, I get two logged events, about 120 milliseconds apart from the
> following script:
>
> // ==UserScript==
> // @namespace http://www.ryanland.com/greasemonkey
> // @name How Lucky?
> // @include *.google.tld/*
...
> Why does it fire twice?
I only see it once.
What URL were you visiting?
Are you sure you don't have two copies of the same script installed?
------------------------------
Message: 8
Date: Sat, 7 Jan 2006 21:58:09 -0800
From: Dave Land <land at aol.com>
Subject: Re: [Greasemonkey] Script firing twice?
To: greasemonkey at mozdev.org
Message-ID: <92381DDA-54DF-492E-81C7-7BFE409696F7 at aol.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Jan 7, 2006, at 6:57 PM, Jeremy Dunck wrote:
> On 1/7/06, Dave Land <land at aol.com> wrote:
>> Oddly, I get two logged events, about 120 milliseconds apart from the
>> following script:
>>
>> // ==UserScript==
>> // @namespace http://www.ryanland.com/greasemonkey
>> // @name How Lucky?
>> // @include *.google.tld/*
> ...
>> Why does it fire twice?
>
> I only see it once.
Hmm. I see it twice every time.
Oh, and it's more like 650-700 ms apart, by the way, not 120 -- I was
foolishly using now.getMilliseconds, rather than now.getTime, to try to
calculate the time between the two firings.
In fact, the only reason I was timing it was to see if maybe it was a
problem with my error console, rather than the script actually firing
twice, but the script is definitely firing twice. I changed it so that
it writes the result of now.getTime into the scriptvals each time. The
next time it fires, It reads it back and calculates the time elapsed
since the last firing in milliseconds.
> What URL were you visiting?
http://www.google.com/search?q=<query terms>
> Are you sure you don't have two copies of the same script installed?
Quite.
And I should probably have specified: 1.5 with 0.6.4, too.
Dave
------------------------------
Message: 9
Date: Sun, 8 Jan 2006 00:09:32 -0600
From: Jeremy Dunck <jdunck at gmail.com>
Subject: Re: [Greasemonkey] Script firing twice?
To: greasemonkey at mozdev.org
Message-ID:
<2545a92c0601072209i4b0dcacer57c922571e5f34fd at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 1/7/06, Dave Land <land at aol.com> wrote:
> >
> > I only see it once.
>
> Hmm. I see it twice every time.
I've tried with personal homepage, without, with a clean profile and
without.
> > What URL were you visiting?
>
> http://www.google.com/search?q=<query terms>
Hmmph. Me, too.
I was basically thinking that there might be a matching iframe involved
somewhere. Is it possible you have another script which creates an
iframe which also matches the pattern?
I'm about out of ideas.
> And I should probably have specified: 1.5 with 0.6.4, too.
Me too.
I'm on mac, though I don't think that should matter.
------------------------------
Message: 10
Date: Sun, 8 Jan 2006 01:16:07 -0500
From: Lenny Domnitser <ldrhcp at gmail.com>
Subject: Re: [Greasemonkey] Script firing twice?
To: greasemonkey at mozdev.org
Message-ID:
<94355ecc0601072216h51dfc3bcpdfe1d2d2f1f03825 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 1/8/06, Jeremy Dunck <jdunck at gmail.com> wrote:
> I was basically thinking that there might be a matching iframe
> involved somewhere. Is it possible you have another script which
> creates an iframe which also matches the pattern?
Try logging the location.
------------------------------
Message: 11
Date: Sun, 8 Jan 2006 02:32:40 -0500
From: chris feldmann <cfeldmann at gmail.com>
Subject: Re: [Greasemonkey] Script firing twice?
To: greasemonkey at mozdev.org
Message-ID:
<7e2c731f0601072332s279b224dm34d031398f98b17f at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On 1/8/06, Lenny Domnitser <ldrhcp at gmail.com> wrote:
> On 1/8/06, Jeremy Dunck <jdunck at gmail.com> wrote:
> > I was basically thinking that there might be a matching iframe
> > involved somewhere. Is it possible you have another script which
> > creates an iframe which also matches the pattern?
>
> Try logging the location.
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
For the record, fires once for me. On linux. Not, as Jeremy says, that
that should/could matter.
------------------------------
_______________________________________________
Greasemonkey mailing list
Greasemonkey at mozdev.org
http://mozdev.org/mailman/listinfo/greasemonkey
End of Greasemonkey Digest, Vol 14, Issue 14
********************************************
More information about the Greasemonkey
mailing list