-- delete --

General questions about scripts and buttons should be asked here. Development scripts and buttons may also be posted for feedback.

Moderators: Support Staff², Support Staff, AvantGuard, Developer

Post Reply
User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Re: [Request] Disable certain (Java)-Script commands

Post by sulpherdragon » Wed Sep 03, 2008 3:52 pm

yes it may be possible.

if an onload="" event was calling a function it may be possible to null the function by adding onload=null into a plugin.
However without more details on your specific problem we cant really help you.
Image

abfan123
Avantus Maximus
Avantus Maximus
Posts: 5624
Joined: Wed Jan 26, 2005 4:24 pm
Windows Version: Vista Ultimate x64 SP2
Avant Version: 11.7 build 43
IE Version: 8
Contact:

Re: [Request] Disable certain (Java)-Script commands

Post by abfan123 » Wed Sep 03, 2008 5:08 pm

I don't think that it'd be possible with the current addons system in Avant, Since the addon script's execution starts just when the page is fully loaded.
IE8(Pro), Microsoft Security Essentials
Main PC:
Image
Secondary PC same as primary but with Windows 7 x64 Ultimate as the OS.

User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Re: [Request] Disable certain (Java)-Script commands

Post by sulpherdragon » Sun Sep 07, 2008 3:55 am

Well this code below will blank the iFrame window. It will however have opened quickly in the first place.
As was mentioned, the addons work AFTER the page has loaded, to edit stuff before the page hits your browser you need an attack proxy. Monkeygrease and Snark may be able to help you if your determined, but theres no easy way to do it.

Code: Select all

var iFrameX=document.getElementById("SELFHTML_in_a_box");
iFrameX.src="about:blank"
This code is tailored to suit the html code you supplied. You may have to modify it to work on other pages.
If the iFrame loads javascript into the parent page then it probably wont be of much use to you. But if you require this code for something other than that, it should blank the iFrame.

If your looking to simply remove the iFrame because its in the way of something, the illusion of removing it can be achieved by adding

Code: Select all

iFrameX.width=0
iFrameX.height=0
Ive uploaded a plugin which appears to completely remove the iFrame, and it will remove some of its effects too (eg, if its playing music or something annoying like that).
Attachments
TestBlockIFrame.aba
(188 Bytes) Downloaded 212 times
Image

addonsfan
Avantic Elite
Avantic Elite
Posts: 1940
Joined: Sun Aug 05, 2007 11:56 am
Windows Version: Windows 7
Avant Version: N/A
IE Version: N/A
Location: California, USA
Contact:

Re: [Request] Disable certain (Java)-Script commands

Post by addonsfan » Sun Sep 07, 2008 4:31 am

iframes yes, activex/flash probably not, but maybe...
With the iframes you can stop them, but they might get a little time to load.

fmustang76
Newbie
Newbie
Posts: 42
Joined: Wed Sep 28, 2005 6:21 pm
Windows Version: Xp Pro
Avant Version: 11.7 Build 15
IE Version: 7

Re: [Request] Disable certain (Java)-Script commands

Post by fmustang76 » Tue Nov 11, 2008 9:51 pm

Here is some bookmarklet code I found online that disables java, flash, background music, and third-party iframes. Maybe it can be worked for Avant to do what you are looking for. I'm sure it can be edited to run automatically at load time but I haven't edited the code all.

Code: Select all

javascript:(function(){function R(w){try{var d=w.document,j,i,t,T,N,b,r=1,C;for(j=0;t=["object","embed","applet","iframe"][j];++j){T=d.getElementsByTagName(t);for(i=T.length-1;(i+1)&&(N=T[i]);--i)if(j!=3||!R((C=N.contentWindow)?C:N.contentDocument.defaultView)){b=d.createElement("div");b.style.width=N.width; b.style.height=N.height;b.innerHTML="<del>"+(j==3?"third-party "+t:t)+"</del>";N.parentNode.replaceChild(b,N);}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x)})()
Zap Plugins Bookmarklet Source

I found it searching for a way to disable flash on MySpace and it seems to work on the sites I have tested to disable flash, music and iframes.

Here is an Avant Browser button cut & paste
zap.aba
(31.34 KiB) Downloaded 245 times

Post Reply

Who is online

Users browsing this forum: No registered users