|
|
Subject: Re: [P] Why not Javascript ? WAS: Python FILTER "PLUGIN"? - msg#00027
List: web.privoxy.user
On Sun, Nov 12, 2006 at 12:16:37PM +0100, Andreas M. wrote:
> On 09.11.2006 17:45 Andreas M. wrote
>
> > What about Javascript ? Not, that I would oppose Python
> > possibilities in Privoxy, but I think, that Javascript would be
> > even cooler, since it is the native scripting language for HTML,
> > and that is, what we are in need to filter.
It seems to me the ability to filter pages via an action and export to
an user-definable external program might be useful. But it will
probably really slow things down if something like Python is invoked
since it would require the underlying system to load the python
interpreter with each request. Just a thought.
Some injection of javascript might be useful too, and would not have
the overhead as above. You could probably scratch together a filter
and have something like this working for the most part now. It seems
very much like what greasemonkey does now, isn't it?
All that being said, these kinds of ideas are useful to somebody,
somewhere, but it just awaits someone with the time and impetus to
implement it.
--
Hal Burgiss
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Why not Javascript ? WAS: Python FILTER "PLUGIN"?
"Andreas M." <sfamix@xxxxxxxxxxxxxxxxxxxxx> wrote:
> I used Junkbuster already in my old Amiga days and my ultimate dream for
> Privoxy would be a scripting-engine, that allows for complete rewrite of
> content as well as a "hot-updates" network, that distributes filters,
> that get automatically deployed to subscribed sites, of course, ran by
> the Privoxy team or persons, they trust. System administration (in this
> case reading html-sources and writing filters) really takes a lot of
> time, with some collaborative efforts, this could be shortened.
You can already create your own deployment tool with a cron job
that regularly fetches standard.action, default.action.master
and default.filter from CVS.
http://ijbswa.cvs.sourceforge.net/ijbswa/current/
I don't think such a feature belongs into Privoxy itself,
but of course it wouldn't hurt to put an update shell script
into the packages.
> On 09.11.2006 11:37 Aleksandar Lazic wrote
>
> > On Don 09.11.2006 10:06, ibsen ige ooisen wrote:
> >> Is there any way to do some filtering in Python?
> >>
> >> That is, instead of doing the s/foo/bar/g in PCRE, I want to do it in
> >> Python, which is more powerful, because I can also do some code (some
> >> of my substitutions need functions).
> >
> > This would also be very nice for some other langugages:
> >
> > perl
> > ruby
> > lua
> > haxe
> > neko
>
> What about Javascript ? Not, that I would oppose Python possibilities in
> Privoxy, but I think, that Javascript would be even cooler, since it is
> the native scripting language for HTML, and that is, what we are in need
> to filter.
In the patch section there is already a patch that adds a pretty
simple way to run documents through a virus scanner. It works
(or is supposed to work, I didn't test it) by saving the document,
starting the virus scanner and checking for the return code afterwards.
I plan to integrate a more generic version of this patch
after the 3.0.6 release is out. Instead of just using virus
scanners one should be able to specify an arbitrary command
to filter the content. This way every user could use the
language of his choice, as long as there is a command line
interpreter available.
> I may be technically too illiterate to comment on this, but to me there
> seems to be a possibility to run the javascript on the DOM (or
> elsewhere) even /before/ it reaches the browser. Since Privoxy now could
> interpret the Javascript on behalf of the browser, it could react
> similare to the browser, but do some "rewrites" according to JS-filters,
> so, that the browser still gets the Javascript needed in order for the
> page to function correctly while the special javascript-filter
> anonymizes and/or rewrites privacy problematic stuff/annoyances.
I don't think this could work reliable enough to be trustworthy
and I doubt that there is an easy way to separate needed JavaScript
from the rest.
Fabian
--
http://www.fabiankeil.de/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Next Message by Date:
click to view message preview
Question: Animated GIFs
As above: What should I do, to disable GIF deanimation in Privoxy?
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Previous Message by Thread:
click to view message preview
Re: Why not Javascript ? WAS: Python FILTER "PLUGIN"?
On 09.11.2006 17:45 Andreas M. wrote
> What about Javascript ? Not, that I would oppose Python possibilities in
> Privoxy, but I think, that Javascript would be even cooler, since it is
> the native scripting language for HTML, and that is, what we are in need
> to filter.
>
> I may be technically too illiterate to comment on this, but to me there
> seems to be a possibility to run the javascript on the DOM (or
> elsewhere) even /before/ it reaches the browser. Since Privoxy now could
> interpret the Javascript on behalf of the browser, it could react
> similare to the browser, but do some "rewrites" according to JS-filters,
> so, that the browser still gets the Javascript needed in order for the
> page to function correctly while the special javascript-filter
> anonymizes and/or rewrites privacy problematic stuff/annoyances.
>
> This seems to be much more sensitive to me than a regular expressions
> based approach. A bit like Network Address Translation (just the
> schema). Javascript Content Translation, so to say.
>
> Another benefit may be, that some of us could drop lots of interesting
> Firefox extensions, that add certain functionalities to web-pages, such
> as BetterShopper, BetterSearch and similare. Saves startup-time for FF
> with many extensions.
>
> While there seems to be many possibilities with regex in this regard,
> this could do even more, since it is much more dynamic and does not need
> to be based on fixed patterns.
No comments on this ?
--
Bye, Andreas
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Next Message by Thread:
click to view message preview
Re: [P] Why not Javascript ? WAS: Python FILTER "PLUGIN"?
On 12.11.2006 15:37 Hal Burgiss wrote
> On Sun, Nov 12, 2006 at 12:16:37PM +0100, Andreas M. wrote:
>> On 09.11.2006 17:45 Andreas M. wrote
>>
>>> What about Javascript ? Not, that I would oppose Python
>>> possibilities in Privoxy, but I think, that Javascript would be
>>> even cooler, since it is the native scripting language for HTML,
>>> and that is, what we are in need to filter.
[...]
> Some injection of javascript might be useful too, and would not have
> the overhead as above. You could probably scratch together a filter
> and have something like this working for the most part now. It seems
> very much like what greasemonkey does now, isn't it?
Right, like Greasemonkey! Though, I would not load an external
Javascript interprter. More and more programs seem to implement the
SpiderMonkey engine of mozilla.org. Javascript is going to be more than
just HTML scripting in the near future.
> All that being said, these kinds of ideas are useful to somebody,
> somewhere, but it just awaits someone with the time and impetus to
> implement it.
Well, with the advent of Web2.0, the coming of XULRunner, webapps and so
on, it may be more than just "someone, somewhere". Of course, I agree:
Someone, somewhere must integrate it sometimes ;-)) (I am not the man
for this job. I'm just a user.)
--
Greetings, Andreas
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|
|