私がやりたいのは、コード内のすべてのアラートをカスタムアラート(「アラートを使用しました」)に変更することです。
var hardCodedAlert = alert; //I know this won't work.But what to do ?
window.alert=function(){
if(this.count == undefined)
this.count=0;
this.count=this.count+1;
if(this.count == 1)
hardCodedAlert("You used alert");
};