Old Proxomitron Forums
Proxomitron Filters - Discussions welcome => Feature-Block => Topic started by: Arne on August 25, 2001, 01:10:19 PM
-
As for those Javascripted links, below is a small filter that in most cases will convert the "openwin", win.open" etc. nonsense to normal links -- so in most cases, thanks to Proxomitron, even that shouldn't be a problem. I'm sure that some of you would be able to come up with a better filter, but anyhow it already does a great job for me...
Submitted by "Register"
[Patterns]
Name = "Strip Javascripted URLs"
Active = TRUE
Bounds = "<as*="javascript:*>"
Limit = 512
Match = "<as*href="javascript:w("1"*>"
Replace = "<a href="1">"
Best wishes
Arne 
Imici username: Arne
-
Dear Arne
I am new here and I know nothing about the html & language. I just have few questions wanted to ask.
1.Does this filter allow a java script link to be opened by right mouse click(open new window) or just press the link a new URL link window would be opened?
2. Do we need to include "...." or just the words within quotes to the fileds in the filter?
3. How do we make it work with Javascripted links such as "javascrip: openmess" or "javascrip:ViewOneAd openmess"and convert them to normal links
sincerely,
pandoras_box
-
Hi,
The filter just strips the javascript part and leaves the link itself. So you can either click it or rightclick it. It leaves just a plain html link on those links it works on.
When copying a filter, just mark from the [Patterns]-part (incl) and down to the last line of the filter (incl) and save it as something.cfg then you go to Proxomitron and click Files and then Merge config filters, and choose your something.cfg. Voila, the filter is now ready to use. Click the save button on Proxomitron whenever you have made changes. It is highlighted when needed.
If you are manually writing the filter, then you should not copy the "'s.
Best wishes
Arne 
Imici username: Arne
-
Thanks Arne
I have merged the new cfg file successfully with default file without sweat. It is easier than I think. However, I still encounter some problems with Javascript links.
1. With Javascripted links such as "javascrip:openmess" (from http://tianying.xilubbs.com) the filter converts the javascript link to normal link successfully. Yet the layout of page becomes disorganised(I don't know whether it is because the pages is in Chinese or not) and once you rightclick the link and none of the links could work.
2.With "javascrip:ViewOneAd" (from a English site this time), the filter has no effect on the site at all and javascript still exists.
regards,
pandoras_box
-
The links in the page you refer to is using a javascript funtion:
......
function openmess(messageno)
{
if (tim==1)
parent.bbsview.location='/cgi-bin/bbs/view?forum=tianying&message='+messageno;
else
window.open('/cgi-bin/bbs/view?forum=tianying&message='+messageno,'','');
}
.....
That is why it does not work here.
Best wishes
Arne 
Imici username: Arne