Chrome extension id - how to find it

后端 未结 6 1526
青春惊慌失措
青春惊慌失措 2020-12-12 18:46

How can I find out what the chrome extension id is for an extension?

相关标签:
6条回答
  • 2020-12-12 19:30

    You get an extension ID when you upload your extension to Google Web Store. Ie. Adblock has URL https://chrome.google.com/webstore/detail/cfhdojbkjhnklbpkdaibdccddilifddb and the last part of this URL is its extension ID cfhdojbkjhnklbpkdaibdccddilifddb.


    If you wish to read installed extension IDs from your extension, check out the managment module. chrome.management.getAll allows to fetch information about all installed extensions.

    0 讨论(0)
  • 2020-12-12 19:30

    If you just need to do it one-off, navigate to chrome://extensions. Enable Developer Mode at upper right. The ID will be shown in the box for each extension.

    Or, if you're working on developing a userscript or extension, purposefully throw an error. Look in the javascript console, and the ID will be there, on the right side of the console, in the line describing the error.

    Lastly, you can look in your chrome extensions directory; it stores extensions in directories named by the ID. This is the worst choice, as you'd have extension IDs, and have to read each manifest.json to figure out which ID was the right one. But if you just installed something, you can also just sort by creation date, and the newest extension directory will be the ID you want.

    0 讨论(0)
  • 2020-12-12 19:32

    Use the chrome.runtime.id property from the chrome.runtime API.

    0 讨论(0)
  • 2020-12-12 19:39

    Extension IDs can be found in:

    chrome://extensions (Chrome_Hotdog >> More_tools >> Extensions) Developer mode.

    For Linux: $HOME/.config/google-chrome/Default/Preferences (json file) under ["extensions"].

    0 讨论(0)
  • 2020-12-12 19:41

    All extension ID are listed here:

    chrome://system
    

    List

    0 讨论(0)
  • 2020-12-12 19:45

    As Alex Gray points out in a comment above, "all of the corresponding IDs are actually on the extensions page within the browser".

    However, you must click the Developer Mode checkbox at top of Extensions page to see them.

    0 讨论(0)
提交回复
热议问题