zxlie / FeHelper

😍FeHelper--Web前端助手(Awesome!Chrome & Firefox & MS-Edge Extension, All in one Toolbox!)
https://www.baidufe.com/fehelper
MIT License
5k stars 1.24k forks source link

请教一个问题 #297

Closed wolfAndTime closed 11 months ago

wolfAndTime commented 11 months ago

请问一下如何在content-script页面执行eval,我在manifest.json里添加了 "content_security_policy": { "extension_pages": "script-src 'self'; style-src 'self' 'unsafe-inline'; object-src 'self'" }

image

但是在content-script里执行eval(eval('console.log(1)'))还是报错了,我想问问fehelper是怎么处理的。 希望有知道的大佬帮忙回答一下,小弟谢谢啦🤞🤞

wolfAndTime commented 11 months ago

看了看源码,知道是咋做的了,👍👍