packed chrome extension loses manifest on restart - google-chrome-extension

I have a Chrome Extension that is using the experimental sidebar API. It works beautifully when it is unpacked, but if I am running a packed version, and restart my browser, it no longer recognizes that I have asked for the sidebar in the manifest. I start getting these errors everywhere the sidebar is referenced:
Error during experimental.sidebar.getState: This extension has no sidebar specified.
This seems like it might be a bug in the sidebar API; or am I missing something obvious?

Though the sidebar API is not documented anymore, code support for it has not been removed. If you are specifying your use of the sidebar as "sidebar": {} in your manifest file, you are most likely running into a Chrome bug where object literals with empty values are removed when a packed extension is loaded at startup.
A workaround is to include a dummy key in the sidebar dictionary (e.g. use sidebar": {"dummy": 1} instead).

The sidebar API is no longer supported, not even as experimental. The code may still be available in some version of Chrome but the documentation is gone and the feature proposal is going to be reworked.

Related

IE11 displays a blank page on localhost, all other browsers work

I have a web-based project. I build it. The port used is 8080.
In chrome, safari, firefox, the project works fine. No errors in the console.
However, on internet explorer 11, the page is blank, but the icon is loaded, as is the HTML, which I can see in the page source.
The page looks like this:
The errors in the developer tools of IE11 outputs this:
I see a compiler error for some missing semi-colons. However, the error is on line 100,000, which makes me think it is in the compiled file. This error is not in other browsers.
This might be related to some JS syntax issues. If bundle includes some modern features of JS, it is supported by modern browsers, but not but IE. So IE cannot parse it correctly.
You can open the error in sources to check if there is some modern syntax construction.
In case this is the problem, you need to setup transpiler options to support IE. Most likely it's babel settings/browserlist.
This article will guide you to resolve the issue:
https://learn.microsoft.com/en-us/troubleshoot/browsers/cannot-access-websites
https://answers.microsoft.com/en-us/ie/forum/all/ie-11-doesnt-preload-while-preloading-with-500/e5d8611d-1a6f-4d2d-beba-4cbb214bd99e
May be you need to change the permissions in IE 11 if the site is not secure
https://www.support.com/how-to/how-to-fix-site-is-not-secure-in-internet-explorer-12900

Extension on Edge on IE compatibility mode

I'm working on a browser extension, initially for Chromium browsers. The extension injects css and js files in the page, and modify content.
We have tried to install it on Edge. It's work fine in most of cases, but doesn't work when a web page is in IE11 compatibility mode. The extension does nothing.
Is it totally impossible to run an extension in the case of IE11 compatibility mode ?
Thanks.
You should see what errors are generated in the DevTool window.
It is easy that some object \ method \ property called by the extension at the time of IE11 did not exist yet.
In any case if you take a look here https://learn.microsoft.com/en-us/deployedge/edge-ie-mode
you may read that extensions that interact directly with the page content are not supported.

How do I get access to all the files in the extension in Chrome Extension Manifest Version 3 (MV3)?

Background
I've been using the crx-hotreload package to auto-reload my chrome extensions during development because it's annoying to have to click the refresh button on the Extensions page every time you make a change; however, this package doesn't work with MV3 because it uses the chrome.runtime.getPackageDirectoryEntry method, which seems to have been removed from chrome.runtime in MV3. I can't find documentation to confirm that it was removed, but it's not there when I try to use it.
Questions
Does anyone know how to get access to all the files in the extension directory in Chrome Extension Manifest Version 3?
Or generally, is there a better way that I can hot-reload my chrome extensions during development that would work for MV3?
This is one of many things based on DOM capabilities of background pages that are removed from ManifestV3 because service workers don't have DOM. For example, getPackageDirectoryEntry is using the old nonstandard FileSystem API in its returned value.
As to why, apparently the switch to service workers simplifies the internal source code in Chromium, even if it doesn't provide any real improvements for extension authors or users.
At this point all you can do is present a convincing use case and ask Chromium developers via https://crbug.com to implement an alternative API.

Chrome extension to change Desktop wallpaper

I'm diving into the world of Chrome Extension development, primarily because there is a very small feature that is missing in Chrome that I miss dearly. The context-menu option to "Set as background/wallpaper" like that found in Firefox. Sounds trivial, but it's convenient.
I have most of the "basic" stuff worked out with the manifest file, am able to install it, even managed to get it to show up as a context menu item.
The problem obviously is that I am wanting to mess with a user's OS-level settings which is extremely difficult because of security issues (fully understand this).
I found an extension that allowed this in older versions of Chrome, and it looked like the developer used some type of .dll and C++ to accomplish this.
I'm not really sure how to make this work.
Since that Chrome doesn't allow these kind of manipulations (such as your PC's settings), you will need to create a native application that will run beside your extension. When the user chooses the image from your extension and selects "use as wallpaper", you will use the native messaging API to send a message to your desktop application, that will set the wallpaper (and do whatever else you can't do within a chrome extension) for you.
You can use the chrome.wallpaper app api to set the wallpaper after using the messaging api to send the image from your extension.

Is there any way to get access to Chrome's theme favicons?

I would like to use Chrome's default favicons.
For example (you can simply open them in Chrome):
chrome://theme/IDR_HISTORY_FAVICON
chrome://theme/IDR_EXTENSIONS_FAVICON
chrome://theme/IDR_SETTINGS_FAVICON
chrome://theme/IDR_PRODUCT_LOGO_16
When I used it as an image source nothing happened. Maybe Chrome blocked the access to the icons or this was not the proper way to use the icons. I tried to use "chrome://favicon/", but it didn't work with Extensions and Settings (strange, but it worked with History).
How can I use the built-in favicons as an image?
I would be also grateful if you could get me a full list of the Chrome's favicons, it must be in Chromium's source code, but I have no idea where to look.
(I'm using Chrome 19.0.1084.52)

Resources