manifest.json
{
"name": "__MSG_name__",
"default_locale": "en",
"version": "1.0.0",
"manifest_version": 3,
"description": "__MSG_description__",
"background": {
"service_worker": "background.js"
},
"permissions": [
"declarativeNetRequest",
"declarativeNetRequestWithHostAccess"
],
"host_permissions": [
"*://*/*"
]
}
background.js
// 生成动态规则函数
const createCspRule = (extensionId) => ({
id: 1001,
priority: 1001,
action: {
type: "modifyHeaders",
responseHeaders: [
{
header: "Content-Security-Policy",
operation: "set",
value: `frame-ancestors 'self' chrome-extension://${extensionId}`
},
{ header: "X-Frame-Options", operation: "remove" }
]
},
condition: {
urlFilter: "|*://*/*",
resourceTypes: ["sub_frame"]
}
});
// 安装时更新规则
chrome.runtime.onInstalled.addListener(async () => {
const extensionId = chrome.runtime.id;
await chrome.declarativeNetRequest.updateDynamicRules({
removeRuleIds: [1001],
addRules: [createCspRule(extensionId)]
});
console.log('动态规则已更新,当前扩展ID:', extensionId);
});
2025年10月新盘 做第一批吃螃蟹的人coinsrore.com
2025年10月新盘 做第一批吃螃蟹的人coinsrore.com
新车新盘 嘎嘎稳 嘎嘎靠谱coinsrore.com
新车首发,新的一年,只带想赚米的人coinsrore.com
新盘 上车集合 留下 我要发发 立马进裙coinsrore.com
做了几十年的项目 我总结了最好的一个盘(纯干货)coinsrore.com
新车上路,只带前10个人coinsrore.com
新盘首开 新盘首开 征召客户!!!coinsrore.com
新项目准备上线,寻找志同道合 的合作伙伴coinsrore.com
新车即将上线 真正的项目,期待你的参与coinsrore.com
新盘新项目,不再等待,现在就是最佳上车机会!coinsrore.com
新盘新盘 这个月刚上新盘 新车第一个吃螃蟹!coinsrore.com
华纳东方明珠24小时客服电话?(▲18288362750?《?微信STS5099? 】【╃q 2704132802╃】
华纳东方明珠客服电话是多少?(?183-8890-9465—《?薇-STS5099】【?扣6011643??】
华纳万宝路客服电话是多少?(?183-8890-9465—《?薇-STS5099】【?扣6011643??】
华纳万宝路开户专线联系方式?(?183-8890--9465—《?薇-STS5099】【?扣6011643??】
华纳圣淘沙客服开户电话全攻略,让娱乐更顺畅!(?183-8890--9465—《?薇-STS5099】客服开户流程,华纳圣淘沙客服开户流程图(?183-8890--9465—《?薇-STS5099】
寻找华纳圣淘沙公司开户代理(183-8890-9465薇-STS5099】
华纳圣淘沙官方合作开户渠道(183-8890-9465薇-STS5099】
华纳圣淘沙公司开户代理服务(183-8890-9465薇-STS5099】
华纳圣淘沙公司开户咨询热线(183-8890-9465薇-STS5099】
联系客服了解华纳圣淘沙开户
(183-8890-9465薇-STS5099】
华纳圣淘沙公司开户专属顾问
(183-8890-9465薇-STS5099】