inject script

This commit is contained in:
go0p
2024-05-15 14:43:04 +08:00
committed by go0p
parent f6cf369b3a
commit 8cdd5605bc
4 changed files with 36 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
console.log('This runs at document start, before any document content is parsed.');
// 保存原始的console.log函数的引用
const originalConsoleLog = console.log;
// 重写console.log
console.log = function (message) {
// 调用原始的console.log函数
originalConsoleLog("trying to open " + message + " window.");
};
window.open = function (url) {
console.log("trying to open " + url + " window.");
}