[导入]Write an Internet Explorer plugin to remove Ads of Windows Live Mail Beta
I have been using Windows Live Mail Beta for quite a while and found its ads were pretty annoying. My favorite browser is Firefox which can removed ads without any hassel, however Microsoft has not proviede fully support for it so have to stick to Internet Explore for the time being.
I tried to use Maxthon, even though ads were gone but their used space were still there, so ugly. In the end I begin to write my own plugin, well, I'll say I am having a good start.
The first thing I did is to add a contect menu says Leave Me Alone implemented via adding this registry,
My Computer
HKEY_CURRENT_USER
Software
Microsoft
Internet Explorer
MenuExt
Leave Me &Alone
There will be a Default string field for the Leave Me &Alone node, set its content to, in my case, files://f:\LeaveMeAlone.htm
The rest work is to create a LeaveMeAlone.htm and let it contains these below lines,
<SCRIPT LANGUAGE="JavaScript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var banner = doc.all.RadAd_Banner ;
banner.style.display = "none";
var nextFrame = doc.all.RadAd_SkyScraper; //RadAd_SkyScraper
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_SMC600;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_120x30;
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_SkyScraper_InMessage;
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_Today300;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_300x125_TodayPage;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_300x125_SMCPage;
nextFrame.style.display = "none";
</SCRIPT>
That's all, now when you right click in your IE window and select Leave Me Alone, all the annoying MS ads will be gone.
This has been tested on Internet Explorer 7.0 public beta only.
文章来源:http://zouyu.blogspot.com/2006/03/write-internet-explorer-plugin-to.html
I tried to use Maxthon, even though ads were gone but their used space were still there, so ugly. In the end I begin to write my own plugin, well, I'll say I am having a good start.
The first thing I did is to add a contect menu says Leave Me Alone implemented via adding this registry,
My Computer
HKEY_CURRENT_USER
Software
Microsoft
Internet Explorer
MenuExt
Leave Me &Alone
There will be a Default string field for the Leave Me &Alone node, set its content to, in my case, files://f:\LeaveMeAlone.htm
The rest work is to create a LeaveMeAlone.htm and let it contains these below lines,
<SCRIPT LANGUAGE="JavaScript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var banner = doc.all.RadAd_Banner ;
banner.style.display = "none";
var nextFrame = doc.all.RadAd_SkyScraper; //RadAd_SkyScraper
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_SMC600;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_120x30;
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_SkyScraper_InMessage;
nextFrame.style.display = "none";
var nextFrame = doc.all.RadAd_Today300;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_300x125_TodayPage;
nextFrame.style.display = "none";
var nextFrame = doc.all.CustComm_300x125_SMCPage;
nextFrame.style.display = "none";
</SCRIPT>
That's all, now when you right click in your IE window and select Leave Me Alone, all the annoying MS ads will be gone.
This has been tested on Internet Explorer 7.0 public beta only.
文章来源:http://zouyu.blogspot.com/2006/03/write-internet-explorer-plugin-to.html