简体   繁体   English

有没有办法获得谷歌浏览器扩展程序的绝对路径

[英]Is there a way to get the absolute path of a google chrome extension

Is it possible to get the absolute path of a google chrome extension? 是否可以获取Google Chrome扩展程序的绝对路径? Any idea, thought, is very welcome!. 任何想法,想法,都非常欢迎!

EDIT 编辑

I build a plugin using Firebreath and i need to know where my extension is locate because i would like to call myExecutable. 我使用Firebreath构建了一个插件,我需要知道扩展的位置,因为我想调用myExecutable。

Folder: 夹:

myExtensionFolder/
     manifest.json
     background.html
     background.js
     popup.html
     popup.js
     **myExecutable**

TIA. TIA。

Solution

Solved the problem. 解决了问题。 I was using a symbolic link to myExecutable file. 我正在使用指向myExecutable文件的符号链接。 I copy the file directly to my folder solves the problem. 我将文件直接复制到我的文件夹即可解决此问题。

Anyways, thanks guys for your answers. 无论如何,谢谢你们的回答。

Inside chrome, it's chrome-extension://your-extension-id-here/whateverfile.html , obtainable via chrome.extension.getURL("whateverfile.html") . 在chrome内部,它是chrome-extension://your-extension-id-here/whateverfile.html ,可通过chrome.extension.getURL("whateverfile.html") On disk, it's the Extensions folder in your user profile . 在磁盘上,它是用户配置文件中的Extensions文件夹。

Solution

Solved the problem. 解决了问题。 I was using a symbolic link to myExecutable file. 我正在使用指向myExecutable文件的符号链接。 I copy the file directly to my folder solves the problem. 我将文件直接复制到我的文件夹即可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM