在文件 URI 方案中使用 Windows 环境变量

Ale*_*tri 5 browser windows uri google-chrome google-chrome-extension

我们可以在浏览器(或至少是 Chrome 浏览器)的路径、文件 URI 方案中使用环境变量,例如 %userprofile% 或 %appdata% 吗?

就像是

file:///%userprofile%/Documents/someFile.html
Run Code Online (Sandbox Code Playgroud)

我正在编写一个 Chrome 扩展程序,用于分析 Chrome 首选项 JSON 文件,以检测可疑的恶意软件活动。

谢谢

Bro*_*ams 4

不,Chrome 无法识别 URL/URI 中的环境变量。

URI 规范中,%是为字符的百分比编码保留的。