The Un-Official Proxomitron Forum
Remove download button request.... - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Filter Help/Request (/forumdisplay.php?fid=31)
+--- Thread: Remove download button request.... (/showthread.php?tid=723)



Remove download button request.... - Maji - Jan. 24, 2006 06:23 AM

Is there any way you can create a web filter that will remove buttons of this kind...

<button onclick="window.NoLocation='some link'" style="some font style">Link Title</button>

And replace them with simple links like this?

<a href="some link">[/url]

I have tried to create a filter myself, but I end up either cutting out too much or too little. Can anyone help me? Smile!


- Kye-U - Jan. 24, 2006 06:47 AM

Try this:

Code:
[Patterns]
Name = "<BUTTON> to <A>"
Active = TRUE
URL = "$TYPE(htm)"
Limit = 128
Match = "<button*onclick=$AVQ(*window.(location|replace)=\'\1\'*)*>\2</button>"
Replace = "<a href="\1">\2[/url]"

Should give you some ideas I hope Wink


- Maji - Jan. 24, 2006 07:04 AM

Thanks!


You just saved me quite a bit of work. Smile! I had to make one slight change, but now it works like a charm. Smile! No more of those pesky buttons. Smile!


- Kye-U - Jan. 24, 2006 08:04 PM

Glad it works! Wink