![image](https://user-images.githubusercontent.com/47652878/224086694-7682a81f-fe33-45b2-aa0a-3eaca6f5fff3.png)
{
"manifest_version": 2,
"name": "Refine Inspector",
"version": "1.0.0",
"permissions": ["<all_urls>"],
"web_accessible_resources": ["inject.js"],
"content_scripts": [
{
"matches": ["chrome://inspect/*"],
"js": ["bridge.js"],
"run_at": "document_start"
}
]
}
(function () {
Function.prototype.bind = new Proxy(
Function.prototype.bind, {
apply(func, thisObj, args) {
if (thisObj.name == 'sendTargetCommand' && args[1] == 'inspect') {
args[1] = 'inspect-fallback'
}
return Reflect.apply(func, thisObj, args)
}
}
)
})()
const script = document.createElement('script');
script.src = chrome.extension.getURL('inject.js');
script.onload = function() {
this.remove();
};
(document.head || document.documentElement).appendChild(script);
- 上面三个文件放入同一文件夹,然后从
chrome://extensions/
打开开发者模式,加载已解压的扩展