We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议允许访问文件网址, 打开file:///D:/Desktop/*.html,扩展用不了
The text was updated successfully, but these errors were encountered:
那可能需要提权了,可以试试
Sorry, something went wrong.
Chrome扩展开发通过权限控制来限制扩展程序的行为。如果扩展需要访问文件网址,用户需要授予相应的权限。
在Chrome扩展程序的清单文件(manifest.json)中,需要添加以下权限:
"permissions": [ "file:///*" ]
这个权限允许扩展程序访问所有以file://开头的URL。
需要注意的是,如果扩展程序想要直接读取文件内容,还需要在清单文件中指定相应的文件。
例如,如果想要读取myFile.txt文件,需要在清单文件中添加以下内容:
"web_accessible_resources": [ "myFile.txt" ]
这个权限允许扩展程序直接访问myFile.txt文件的内容。
No branches or pull requests
建议允许访问文件网址, 打开file:///D:/Desktop/*.html,扩展用不了
The text was updated successfully, but these errors were encountered: