[Greasemonkey] "Bloglines Keep All New Link" User script

Mark Wubben markwubben at gmail.com
Mon Jun 13 14:54:40 EDT 2005


Okay NIcola, you're getting there now :)

On 6/9/05, Jeremy Dunck <jdunck at gmail.com> wrote:
> But the point is, all GM scripts are wrapped, and if you want to
> access them outside of the originally injected scope chain, you'll
> need to export them.  Put another way: by adding window.foo, you're
> guaranteeing that foo is in any further JS's scope chain.
> 
> But you should only do that if you need to, since you're cluttering
> the shared page namespace at that point.

What needs to be done here is prefixing the public methods with a
unique name, which could simply be `np_bl_`. Then also only make the
methods you need public; for example in the code above you don't have
to make `xpath` public, it's accessible from the
`checkAllKeepNewBoxes` method already. More at
<http://novemberborn.net/sifr/explained/terminology>.


More information about the Greasemonkey mailing list