ReplaceGoogleCDN扩展 修改UserAgent
文档说明:只记录关键地方; 2023-01-29
目的:因为屏幕小,移动端使用神马搜索太不方便了,想在PC端使用神马搜索
实验:通过chrome dev-tools 控制台调试发现,把 UserAgent 修改为移动端标识,可以打开神马搜索
借助 ReplaceGoogleCDN 就可以自定义 UserAgent
自定义UserAgent规则
[
{
"id": 1,
"priority": 2,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"header": "user-agent",
"operation": "set",
"value": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
}
]
},
"condition": {
"urlFilter": "m.sm.cn",
"requestDomains": ["m.sm.cn"],
"resourceTypes": [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"font",
"object",
"xmlhttprequest",
"ping",
"csp_report",
"media",
"websocket",
"webtransport",
"webbundle",
"other"
]
}
}
]
验证例子:PC 端打开站点:m.sm.cn
添加自定义规则: