想在谷歌扩展的Content Scripts里改写页面的window对象,例如
var _alert =window.alert;
window.alert = function(){
console.log(arguments);
_alert(arguments);
}
但是这个改写的并不是页面的window对象,而是Content Scripts里的window对象,请问页面的window对象在扩展里要如何获取和改写呢?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
記得好像不能直接存取
window試試看~