开发者

Can a Google Chrome extension/web-application request its own ID string?

开发者 https://www.devze.com 2023-01-29 05:15 出处:网络
I need to specify the ID of a Google Chrome web-application for checking URLs (eg: chrome-extension://[id_goes_here]/application.html). Is there some way I can call the ID with JavaScript and then con

I need to specify the ID of a Google Chrome web-application for checking URLs (eg: chrome-extension://[id_goes_here]/application.html). Is there some way I can call the ID with JavaScript and then construct the URL?

I'm thinking of using something along the lines of:

"chrome-extension://" + whatever_calls_the_ID + "/application.html";

to check the URLs, but need to kn开发者_运维百科ow how to call the ID.

Thanks for your help.


In javascript:

var myid = chrome.i18n.getMessage("@@extension_id");

(no extra permissions required to make this call)

More info...

0

精彩评论

暂无评论...
验证码 换一张
取 消