Google Chrome Extension for Transparent Tabs or Windows - google-chrome-extension

Is it possible to create a browser extension that would allow page-controlled window opacity? Not so that various elements on the page are of a given opacity, but to allow one to see other windows (like the desktop) behind the browser page.
Thank you.

No, this is not possible in an extension. Such transparency would be handled at the window manager level, and would require platform-specific code. This means that either Chrome would have to add this feature and expose it as an extension API (currently no such feature exists), or you would have to write a plugin.

Related

Programmatically enable panels in chrome chrome://flags/#enable-panels

I know how to manually enable panels in Chrome.
I have written a chrome extensions that uses panels. Unfortunately users have to enable that manually first.
chrome.windows.create({type:"panel", url: temp, width:pos.w,height:pos.h, top:pos.top, left:pos.left}, function (_win) {
win = _win.id;
});
Question: is it possible to have panel feature enabled for an extension WITHOUT having to do that manually?
You can't from within an extension, period.
Chrome flags are experimental features and you should never assume that they are present.
If you have some sort of external installer, you could modify Chrome's shortcuts to include the --enable-panels flag; but that's considered browser hijacking and is unreliable (Google constantly pushes against malware that uses similar techniques).
At least with chrome.tabs.create you can specifically open chrome://flags/#enable-panels after explaining to your user to enable it.
It isn't documented yet, but panels are enabled by default for Chrome OS apps since 45. You will need to split functionality and use external messaging. On other systems, you can fallback to an alwaysOnTop window (alwaysOnTopWindows permission). You will need to put it in the lower right yourself.
chrome.app.window.create("test.html", { alwaysOnTop: true, type: "panel" })

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.

Can a Chrome extension launch new Chrome windows under different user profiles?

Is there an API for a Chrome extension to launch and control new Chrome windows under different user profiles?
My understanding is that while an extension may be run under multiple user profiles simultaneously, these instances are isolated; they cannot communicate directly and an extension in one profile cannot access the windows/tabs/processes/etc of another profile. Is this the case?
It seems like the best way to launch and control Chrome windows under multiple profiles is to use an approach based on the Remote Debugger API such as the ChromeDriver project.
For context, I'm interested in writing a tool to manage and launch predefined "bundles" of multiple Chrome windows, each with different URLs and screen positions, and each under a different profiles. The attached screenshot shows an example desired state: three browsers, each in a separate profile, each at a different URL, with different devtools states, organized in a specific screen layout. It is conceptually similar to tmuxinator.
If I wanted to provide a Chrome-based UI for designing and managing these presaved layouts, it seems that I would need to provide a native shim that invokes new Chromes via chromedriver, and communicate with them via native messaging. Is there a more direct API that I am missing?
It seems that the proposed Profile Extension API would do exactly what I'm interested in, but I don't see any discussion on the apps-dev#chromium.org list.
If chrome allowed this it would be a huge security hole.
Chrome extensions are installed per user account so they shouldnt be able to see anything from other accounts.

Global(system) hotkeys for chrome extension

Is it possible to create system hotkeys/shortcuts for Google Chrome Extension? I mean hotkeys that also works when Chrome doesn't have focus.
Yes, but it won't be trivial. To get truly global hotkeys you will have to use native messaging. You will need to create some application to run in the background and capture keypresses and then you can send those keypresses back to Chrome through stdout. This approach will require you to create an additional installer for your extension to install the native messaging app onto the user's system...before you could bundle your app along with the extension (using NPAPI) but that has recently been phased out. I have seen some discussion in the Chromium group about adding bundling support for native messaging apps, but nothing has been added (yet).
Another much easier option is to use the Chrome commands API which will enable you to use hotkeys across all Chrome windows (but not globally...). Just something to consider if "true" global hotkeys are not an absolute requirement since this approach is (much) less complex.
Global media keys will be added to Chrome soon, however. There is a good discussion about this feature to read here.
It's now part of Chrome: chrome://extensions/shortcuts

Is it possible to call one extension from another

I have Google Chrome and the extensions installed on it. I would like to reduce number of extension buttons on Chrome panel.
For this I want to create my plugin which will display popup window and allow to run another extension installed on my browser?
Is it possible and where I can find examples?
The messaging API has an external extension feature. You can use that communicate between extensions.

Resources