ã¯ã¦ãã§returnããªããªã£ã¦ãã¨ããææããã£ãã®ã§ãããä¿®æ£ããã var Hook=function(){ var old; this.addHook=function(obj,method,before,after){ old=obj[method]; obj[method]=function(){ before&&before.apply(this,arguments); var ret=old.apply(this,arguments); after&&after.apply(this,arguments,ret); return ret; } } this.removeHook=function(obj,method){ obj[method]=old; } } var h=new Hook(); h.addHook(window,'confirm', function()
{{#tags}}- {{label}}
{{/tags}}