mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-22 03:10:43 +08:00
inject script
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
Reference in New Issue
Block a user