[Greasemonkey] Re: Greasemonkey or a filtering proxy?

Jeff Barr jeff at vertexdev.com
Sat Sep 10 14:34:05 EDT 2005


Presto Wk wrote:

> It is possible that I do not fully understand Greasemonkey, and I am
> certainly not experienced with JavaScript/DOM.  Therefore I need to
> ask a question: wouldn't a JavaScript snippet provided in a HTML page
> have full read-write access to the page DOM?  If so, I fail to see why
> a filtering proxy could not achieve what Greasemonkey does: the
> filtering proxy could simply modify the page textually to have the
> desired JavaScript executed.

When you say "a JavaScript snippet provided in a HTML page", 
it is not clear that you know that a single GM script can 
apply to any number of different pages; the script is not 
embedded in or restricted to a single page.

> You are thinking of a site-wide proxy.  I'm thinking of a personal
> proxy that you install on the same machine as your web browser.  As
> far as I can tell a proxy can be a pretty light-weight process.

Yes, that could definitely be true.

However, a lot of things that are very easy in GM would (I 
think) be hard in a proxy. For example, GM scripts can 
easily install client-side event handlers. They can override 
or augment existing "onclick" functionality.

Also, because they are on the client, GM scripts are 
relatively easy to debug (stop laughing, Mark :-). Firefox 
includes logging tools (the JavaScript console) a number of 
different tools for viewing the DOM, and so forth. a 
personal proxy with all of this functionality would have 
many large chunks of code in common with a browser. 
Fetching, parsing, DOM, JavaScript interpreter, memory 
management, and so forth. It doesn't need to do page layout 
and it doesn't need the UI, but that's about it.

> With a personal proxy none of these points are valid: you are fully in
> charge of your personal proxy, which allows you to inspect what
> modifications would apply to any URL.

Agreed.

I do think that the concept of a personal proxy has merit, 
but we have GM and we don't have a personal proxy with 
nearly the same level of functionality (as far as I know).

Jeff;

-- 
* RSS Feeds:       http://www.syndic8.com
* Blog:            http://www.syndic8.com/~jeff/blog/
* Web Services:    http://aws.typepad.com
* Resume:          http://www.syndic8.com/~jeff/resume.html



More information about the Greasemonkey mailing list