Chrome flag for automatically pinning an unpacked extension - google-chrome

With command line parameters for Chrome, we know that we can automatically load an unpacked extension while we develop it:
chrome.exe --load-extension=path/to/my-extension
Is there a related parameter for also "pinning" it to the Extensions toolbar area in the browser?

Related

Locally installed extension disables itself?

I'm testing an extension for Chrome and it's unpacked to a local directory. I installed it with the "load unpacked extension" button in settings. For some reason, after an unspecified amount of time, it just disables itself. I can go back into settings and re-enable it, but it does this all the time.
I'm using Ubuntu if it matters.
Chrome extension can call chrome.management.setEnabled(chrome.i18n.getMessage("##extension_id"), false); to disable it self, so if you want to stop this behavior, you could take a look at the extension code and comment out this block of code.

Install Chrome extension form outside the Chrome Web Store

I have developed a Chrome extension and I have packed it.
I sent my extension to some people to try it, but Chrome started to block extensions that it does not find in the store.
Is there any way to install my extension without getting blocked by Chrome?
EDIT
Is there any way to install extension as developer mode? I read that only extensions that installed in developer mode will not blocked.
For regular Windows users who are not skilled with computers, it is practically not possible to install and use extensions from outside the Chrome Web Store.
Users of other operating systems (Linux, Mac, Chrome OS) can easily install unpacked extensions (in developer mode).
Windows users can also load an unpacked extension, but they will always see an information bubble with "Disable developer mode extensions" when they start Chrome or open a new incognito window, which is really annoying. The only way for Windows users to use unpacked extensions without such dialogs is to switch to Chrome on the developer channel, by installing https://www.google.com/chrome/browser/index.html?extra=devchannel#eula.
Extensions can be loaded in unpacked mode by following the following steps:
Visit chrome://extensions (via omnibox or menu -> Tools -> Extensions).
Enable Developer mode by ticking the checkbox in the upper-right corner.
Click on the "Load unpacked extension..." button.
Select the directory containing your unpacked extension.
If you have a crx file, then it needs to be extracted first. CRX files are zip files with a different header. Any capable zip program should be able to open it. If you don't have such a program, I recommend 7-zip.
These steps will work for almost every extension, except extensions that rely on their extension ID. If you use the previous method, you will get an extension with a random extension ID. If it is important to preserve the extension ID, then you need to know the public key of your CRX file and insert this in your manifest.json. I have previously given a detailed explanation on how to get and use this key at https://stackoverflow.com/a/21500707.
For Windows, you can also whitelist your extension through Windows policies. The full steps are details in this answer, but there are quicker steps:
Create the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist.
For each extension you want to whitelist, add a string value whose name should be a sequence number (starting at 1) and value is the extension ID.
For instance, in order to whitelist 2 extensions with ID aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa and bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, create a string value with name 1 and value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, and a second value with name 2 and value bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb. This can be sum up by this registry file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist]
"1"="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"2"="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
EDIT: actually, Chromium docs also indicate how to do it for other OS.
EDIT (06/05/2022): ExtensionInstallWhitelist is deprecated since Chrome 100, it has been renamed to ExtensionInstallAllowlist (answer updated)

Apps, Extensions and scripts cannot be added from this website

I'm trying to add the Rapid Interface Builder extension to chrome using the rib.crx file I downloaded from https://01.org/rapid-interface-builder/downloads/2012/rib-preview-1-chrome-extension
Unfortunately, every time I open the crx file with chrome I get the following error:
Apps, Extensions and scripts cannot be added from this website.
Any ideas on how to fix this?
Instead of opening the file, you have to: extract it (crx are zip files), then visit chrome://extensions, enable developer mode, and load unpacked extension.
The reason for this is: lots of people try to abuse chrome apps/extensions to install nasty applications to your browser. So Chrome tries to make it impossible to automatically side-load these apps without you making sure that is really what you want to do.
So.. typical caveats of installing software apply when using this approach.
You can now also just drag-and-drop the .crx file onto the chrome://extensions page and it will install, too.
Edit 2019-01-10: Make sure to enable Developer mode for extensions. If this was not enabled, refresh the chrome://extensions page after enabling it.
Edit 2018-08-24: This works on Windows, too.
Edit:
This doesn't work on Windows. Verified on OSX and ChromeOS. From what I've read, this will work on Linux, too.~
(I initially experienced the same problem you described.*)
This solution worked for me in Windows 10 (build th1511) x64:
Open Chrome as you normally would.
Go to the "Extensions" page (chrome://extensions; or click Menu button at top right corner → From 'More tools' drop down menu select 'Extensions').
Drag and drop the .crx file onto the extensions page in Chrome -onto the list of extensions.
You should see a dialog stating "Drop here to install". This must be present. (If you do NOT see this, reposition your mouse - it may be too far to the side of the page.)
It should load successfully and you should see the extension in the list immediately afterward.
*I received the same error you described when attempting to load the .crx file (packed extension) by right-clicking/double-clicking it and selecting "Open With" "Chrome", and by dragging/dropping the file onto a regular webpage in Chrome.
In the Extensions page, just enable Developer mode. From there you can drag and drop any .crx file there and installation prompt will follow suit.
Open Chrome with this parameter --enable-easy-off-store-extension-install, then go to extensions and enable Developer mode. Now you can install .crx files without any problem.
go on extension, and your first step is on developer mode, 2 step update extensions, and last drop IDM extension file on google chrome.

manual installation of Web Developer addon in Chrome

There's very little documentation at GitHub:
The extension can be installed in Chrome by loading the unpacked
extension in build/chrome as described in the Chrome documentation.
The extension can be installed in Firefox by installing
web-developer-firefox.xpi like a regular extension or automatically
with ant install.firefox and the Extension Auto-Installer extension.
Anyone knows how to install in Chrome using the GitHub master zip? When I downloaded the master files, I noticed there isn't a build/chrome folder, so maybe this information is out of date.
UPDATE: Using the unpackaged extension method, I get an alert that makes me move several files in order to recreate the file structure specified in manifest.json, but I get stuck with an alert that states:
Default locale was specified, but _loacles subtree is missing.
If you want to load an Extension from git-hub for testing , follow these steps:
Visit chrome://extensions in your browser (or open up the settings menu by clicking the icon to the far right of the Omnibox and select Extensions under the Tools menu to get to the same place).
Ensure that the Developer Mode checkbox in the top right-hand corner is checked.
Click Load unpacked extension… to pop up a file-selection dialog.
Navigate to the directory in which your extension files live(Go to Root Folder of manifest.json file) , and select it.

WebGL Inspector Extension Does Not Appear in Chrome for file:// urls?

My steps (these are the ones described in the docs), under Win 7:
Downloaded/unpacked the zip file
using cygwin, ran the buildextensions.sh file, which created the lib and extensions dirs
opened Chrome
installed the webgl extension via the chrome store
(various repeats of closing/relaunched chrome along the way from here on, with little help)
chrome setup->extnesions, make sure webgl is enabled
turn on developer mode, "load unpacked extension...." selecting the (created) extensions/chrome directory (in this case, C:\Users\kbjorke\Documents\benvanik-WebGL-Inspector-6108bee\benvanik-WebGL-Inspector-6108bee\core\extensions ) and allow "file://" url's
??? no amount of relaod/update/restart seems to cause the GL logo to appear among the extensions buttons at upper right -- even when I load webgl-intensive pages, UNLESS I first load a webgl page from some NON-file:// page -- if I open another tab with an http:// webgl page, I see the red "GL" indicator TWICE in that address bar, but they both lead to the http:// page, not my file:// !
How can I get at my own page, short of pushing it to an external server?
Use a local server. Just open a command prompt, cd to your webpages and then type
python -m SimpleHTTPServer
Then go to
http://localhost:8000
I don't think extensions are allowed to run on file:: urls because then an extension could read your hard drive.
If you are doing video or audio then try this node server.
I just downloaded WebGL Inspector 1.13, and it has a setting (under Settings>Extensions>WebGL Inspector) that reads "Allow access to file URLs". Does what it sounds like - all set!