Old Proxomitron Forums
April 19, 2014, 03:23:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: No activity here! This forum is read-only. Go to http://prxbx.com/forums/index.php.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Allow right mouse click II  (Read 2593 times)
Admin
Forum Admin
Administrator
Jr. Member
*****
Posts: 62

1448105
View Profile WWW Email
« on: July 31, 2001, 11:40:49 AM »

http://arne.jaha.dk/download.php/1,15,5/id34.zip
Hi all,

I came across a site the other day with another tricky way of
stopping the right mouse button from working. I suspect this may be
an IE "feature". Anyway, here's a filter to fix it.

[Patterns]
Name = "Allow Right Click 2"
Active = TRUE
Bounds = "<body*>"
Limit = 256
Match = "1oncontextmenu=2"
Replace = "1Prx_offcontextmenu=2"

Regards,
Michael

With regards from
Admin
Logged

With regards from
Admin
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #1 on: June 08, 2002, 12:35:49 PM »

A site to test it on is here:
http://www.ncsx.org/2002/ncs060302/ncs0603.htm

And I find that modyfying the orginal filter to this one does the same trick: (new is in red)

[Patterns]
Name = "Allow right mouse click"
Active = TRUE
Limit = 256
Match = ".(document.oncontextmenu|onmousedown=|captureEvents()1"
Replace = ".PrxOff_1"

Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« Reply #2 on: June 08, 2002, 12:41:22 PM »

For those using Paul Rupe's Tame start/end JS:
These functions are already nullified in end.js.

edit:
That doesn't mean Tame JS is the all in one solution for everyone.
It can be too restrictive at times, and modifying the scripts is more difficult then switching of a filter

Edited by - sidki3003 on 08 Jun 2002  14:03:35
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #3 on: June 08, 2002, 01:12:00 PM »

Yes, I have that filterset here in my default.cfg, but it is turned off. I was sitting here trying to remember why I turned it off in the first place, but could not really remember. When you mention it, I seem to remember that this was the exact reason. It killed a few things I wanted to preserve. But there is much to be learned in Paul's filterset which in fact is really good. So people should download it, try it out and have a look at the good coding in it.

Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« Reply #4 on: June 08, 2002, 01:35:16 PM »

I had a hard time with these scripts recently to get some things back
e.g. popup bookmarklets, menues depending on timers, and a few more
But finally it worked and it's fun too

Here is Paul Rupe's proxo page again:
http://www.geocities.com/u82011729/prox/


 
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #5 on: June 08, 2002, 06:28:04 PM »

hi sidki and arne,

this to let you know that in my filter set i have a different approach to tame javascript: i've simply realized 2 tame javascript [vm version] and 2 file, vmstart.js and vmend.js INCLUDING FILTERS in them, not simply js code.
this way you can easily recognize what you need and what you can delete. this also allows user to add new code from his own filters. these files also are really simply to maintain.

as usual, you can find my filter set at:
http://virgolamobile.50megs.com/proxomitron.html

read also vmstart.txt in html folder.

regards,
altosax.

 
Logged

 
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« Reply #6 on: June 08, 2002, 06:55:06 PM »

Hi altosax,

I tried your config recently and liked it
As you saw with the mimefix list (the content-header thread),
i adopted some of your ideas.

From your vmstart.js i'm using your faked functions idea.
So i'm also trying to simplify Paul's scripts,
and they look quite different by now

regards, sidki


 
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #7 on: June 08, 2002, 06:57:01 PM »

Nice! Now I have something more to read tonight. I love to read what you guys have made. It gives so many ideas and the opportunity to learn more and to see things I have missed. Thanks!

Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #8 on: June 08, 2002, 08:01:05 PM »

quote:

For those using Paul Rupe's Tame start/end JS:
These functions are already nullified in end.js.

edit:
That doesn't mean Tame JS is the all in one solution for everyone.
It can be too restrictive at times, and modifying the scripts is more difficult then switching of a filter


Paul Rupe is very helpful with these filters tho

I have emailed him several times, and have modified my version of start.js a bit, to allow certain functions (and disable others he does not include). I prefer using as little files as possible -- hence I put all the JS which is to be used always in start.js (or end.js), and all my user CSS which should always be used in prox.css.

 
Logged

 
lnminente
Jr. Member
**
Posts: 73


View Profile WWW Email
« Reply #9 on: August 12, 2002, 06:10:22 PM »

Another filter:

Name = "Allow Right Click 3"
Active = FALSE
URL = "$TYPE(htm)"
Limit = 256
Match = ".(on(contextmenu|mousedown|mouseup)|captureEvents)1"
Replace = ".1Prox"

And one question:
If i put bounds <script*</script>, the filter dont works well, why?

Note: I changed the replace code. Was missing the point before 1Prox

Edited by - lnminente on 13 Aug 2002  16:08:00
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #10 on: August 12, 2002, 07:40:04 PM »

Inminente wrote:

quote:

And one question:
If i put bounds <script*</script>, the filter dont works well, why?



when you use the bounds field, you have to match the whole bounds. this should work:

Match = ".(on(contextmenu|mousedown|mouseup)|captureEvents)12"
Replace = "1Prox2"

but i suggest to not use bounds with this kind of filters because if you use bounds you need also to enable multi filtering, and this increase the time needed to filter the script. if you try to use bounds and not to enable the multi filtering you risk to not filter malicious code contained in the same script, so the filter is well written as it is now.

regards,
altosax.

 
Logged

 
lnminente
Jr. Member
**
Posts: 73


View Profile WWW Email
« Reply #11 on: August 13, 2002, 03:31:38 PM »

Many thanks Altosax. And sorry, my poor english limit me.

I did explain the problem very very bad

I was trying to tell that the filter with
Match = ".(on(contextmenu|mousedown|mouseup)|captureEvents)12"
only works for the first code matched, but not for the rest.

The code to verify it is the next (extracted of http://www.ncsx.org/2002/ncs060302/ncs0603.htm ):

<script language=JavaScript>
<!--

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>

Edited by - lnminente on 28 Aug 2002  16:59:25
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #12 on: August 13, 2002, 06:59:58 PM »

as i wrote in my first post, if you use bounds with this kind of filter, you need to enable multi filtering, so add:

Multi = TRUE

and the filter will work for all occurrence of the matching code.

regards,
altosax.

 
Logged

 
lnminente
Jr. Member
**
Posts: 73


View Profile WWW Email
« Reply #13 on: August 14, 2002, 12:13:55 AM »

Sorry, but still doesn't work.

With multiple matches allowed, each filter only can match the same code one time.

I would like that the same filter matches the same code more times, not only one.



Other thing: I don't like the version 3,(without bounds) Why?

Because will change this
<a href=http:\www.web.captureEvents.cometc.gif>[link]</a>
to that
<a href=http:\www.web.captureEventsProx.cometc.gif>[link]</a>


Perhaps, you can think that there is no web called captureevents.com

But i had a problem with the config set of JD5000 with the filter "Browser Info in JS (Browser & OS)" and the web www.onlinedown.net because the filter matches ".online" as a javascript

Regards.

Edited by - lnminente on 28 Aug 2002  17:02:00
Logged

 
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« Reply #14 on: August 14, 2002, 12:21:21 AM »

You're right, you need the replacement stack for multiple matches within bounds.
I posted an example here .


 
Logged

 
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!