Mock:Intercept and directly return data
拦截请求并直接返回 Mock 数据,包括 XMLHttpRequest、fetch类接口
Additional files are visible only to premium users
manifest.json
{
"update_url": "https://clients2.google.com/service/update2/crx",
"name": "Mock:Intercept and directly return data",
"version": "1.3.2",
"description": "拦截请求并直接返回 Mock 数据,包括 XMLHttpRequest、fetch类接口",
"manifest_version": 3,
"options_page": "options/index.html",
"icons": {
"16": "images/icon.png",
"32": "images/icon.png",
"48": "images/icon.png",
"128": "images/icon.png"
},
"action": {
"default_icon": {
"16": "images/icon.png",
"32": "images/icon.png",
"48": "images/icon.png",
"128": "images/icon.png"
},
"default_title": "swagger mock 插件"
},
"background": {
"service_worker": "scripts/background.js",
"type": "module"
},
"permissions": [
"storage",
"declarativeNetRequest"
],
"host_permissions": [
"http://*/*",
"https://*/*"
],
"content_scripts": [
{
"js": [
"scripts/content.js"
],
"matches": [
"<all_urls>"
],
"run_at": "document_start",
"all_frames": true
}
],
"web_accessible_resources": [
{
"resources": [
"scripts/overrideRequest.js"
],
"matches": [
"<all_urls>"
]
}
],
"commands": {
"_execute_action": {
"suggested_key": {
"windows": "Ctrl+M",
"mac": "Command+M",
"chromeos": "Ctrl+M",
"linux": "Ctrl+M"
}
}
}
}