Wednesday, January 21, 2015

Install already-installed extenstion of google chrome to another google chrome

sometimes you move changes pc, or reinstall a new pc or create a new profile.
And you don't want to download the extensions again. So you can use the already-installed extensions of your old chrome profile.

On linux, the google chrome extensions store in
~/.config/google-chrome/Default/Extensions/

1- list all you installed extensions
 ~$ ls ~/.config/google-chrome/Default/Extensions/
ajohlebnhimmcoofoiboecphpljacfeb/ djflhoibgkdhkhhcedjiklpkjnoahfmg/
anlomjepbdgcgkebglgfpkinmdjgelhd/ ffhkkpnppgnfaobgihpdblnhmmbodake/
aohghmighlieiainnegkcijnfilokake/ fommidcneendjonelhhhkmoekeicedej/
apdfllckaahabafndbhieahigkjlhalf/ mgkobemkdgkhokpbglngodgbccjgnhic/
bepbmhgboaologfdajaanbcjmnhjmhfn/ nmmhkkegccagdldgiimedpiccmgmieda/
blpcfgokakmgnkcojhhkbfbldkacnbeo/ pgeolalilifpodheeocdmbhehgnkkbak/
coobgpohoikkiipiblmjeljniedjpjpf/ piekbefgpgdecckjcpffhnacjflfoddg/
dbepggeogbaibhgnhhndojpepiihcmeb/ pjkljhegncpnkpknbcohdijeoejaedia/
djcfdncoelnlbldjfhinnjlhdjlikmph/


2- to find out which directory is extension's directory, we can read the manifest.json file in the directory, the below dbepggeogbaibhgnhhndojpepiihcmeb is Vimium

~$ cat ~/.config/google-chrome/Default/Extensions/dbepggeogbaibhgnhhndojpepiihcmeb/1.49_0/manifest.json
{
   "background": {
      "scripts": [ "lib/utils.js", "background_scripts/commands.js", "lib/clipboard.js", "background_scripts/sync.js", "background_scripts/settings.js", "background_scripts/exclusions.js", "background_scripts/completion.js", "background_scripts/marks.js", "background_scripts/main.js" ]
   },
   "browser_action": {
      "default_icon": "icons/browser_action_disabled.png",
      "default_popup": "pages/popup.html"
   },
   "content_scripts": [ {
      "all_frames": true,
      "css": [ "content_scripts/vimium.css" ],
      "js": [ "lib/utils.js", "lib/keyboard_utils.js", "lib/dom_utils.js", "lib/handler_stack.js", "lib/clipboard.js", "content_scripts/link_hints.js", "content_scripts/vomnibar.js", "content_scripts/scroller.js", "content_scripts/marks.js", "content_scripts/vimium_frontend.js" ],
      "matches": [ "\u003Call_urls>" ],
      "run_at": "document_start"
   }, {
      "all_frames": true,
      "css": [ "content_scripts/file_urls.css" ],
      "matches": [ "file:///", "file:///*/" ],
      "run_at": "document_start"
   } ],
   "description": "The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.",
   "icons": {
      "128": "icons/icon128.png",
      "16": "icons/icon16.png",
      "48": "icons/icon48.png"
   },
   "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCavizCZ9EnBGbtcRmMErcaxD2WUHJ9ME8IYGQhUBlFgIvchJjAO8koyak3AM95dqu3sOLdtIYD+75T82V1Wl5fLnHAeij2/IWL2VViTHeZhXZl1+rD9sRDaEYd7aZetpJ29+XXfhVphKArCCfwbYCtoJhTIr6S6DYsXuRevoV0EwIDAQAB",
   "manifest_version": 2,
   "name": "Vimium",
   "options_page": "pages/options.html",
   "permissions": [ "tabs", "bookmarks", "history", "clipboardRead", "storage", "sessions", "\u003Call_urls>" ],
   "update_url": "https://clients2.google.com/service/update2/crx",
   "version": "1.49"
}

3- To install  it
  -  inside ~/.config/google-chrome/Default/Extensions/dbepggeogbaibhgnhhndojpepiihcmeb/1.49_0/   rename _metadata to anything name, but must not start with "_"

  - go to extension manager by type chrome://extensions

  - Click on the "Developer mode"

  - browse to the directory then it will Vimium will be installed


No comments:

Post a Comment