I'm looking to achieve something similar to Bitly's Chrome Extension. It's not exactly frameless but the style of the title bar is minimal. Also, unlike other types of windows, in Mac OS you can maximize the main browser window and spawn Bitly's window on top.
Neither window.open nor chrome.windows.create offer any options to remove the frame of a launched window. And when these windows are spawned from a fullscreen browser window (maximized) they are also maximized and cannot be used on top of the current browser window.
Chrome.app.window.create does expose the option to remove the frame but this only works for Chrome Apps and not extensions.
Neither of these potential duplicate questions sufficiently answer my question:
How do I customize the title bar of a popup in a chrome extension?
How to build an chrome extension like Google Hangouts (panels are deprecated)
Related
There are many (1 2 3) answers on Stackoverflow saying a Chrome extension cannot have rounded corners when opened, and yet... The 1Password extension does.
I've noticed the extension is draggable unlike other extensions, and I've noticed I can't right click and inspect it. I've also noticed that if I drag it very quickly, a 'ghost' extension flickers in the middle of my screen.
Any ideas whats going on?
What you're seeing is not part of the Chrome extension, but the 1Password application itself. The extension merely acts as a middleman between Chrome and the real password manager app on your computer. In fact, the 1Password extension requires the 1Password app to be installed on your computer in order to work. When you click on the icon, that's not a popup window, but a native window created by the 1Password app itself. This is done through native messaging.
I'd like to display a window or a dialog box without a title bar from chrome extension. The extension plugs into file browser on Chrome OS. I've seen some examples that use jquery to accomplish this but all of them use browser tabs and are applicable to chrome browser. Tabs are not available to my extension so I'm not quite sure how to do that.
Is it possible to create a Chrome shortcut that will launch a web app in such a way that users will not be able to view or access the URL of the web app via Chrome, e.g., via the address bar, status bar, developer tools, etc. If not, would it be possible if I packaged the web app as a Chrome app? I should note that I am not concerned about the shortcut itself containing the URL, e.g., in its "Properties", because I already have an executable will which launch the shortcut. All I care about is the user not being able to view the app from within Chrome itself once the app has been launched, at least not easily.
I have tried adding Chrome flags/switches, namely, kiosk mode, fullscreen mode, and app mode, but none of them work 100% as needed. Kiosk and fullscreen modes will launch as such only if no other instances of Chrome are open; if another instance of Chrome is already open, both modes will launch in a regular view mode in which users can see the URL in the address bar. App mode (I added "--app=http://www.example.com" to the end of the "Target" property of the shortcut) is promising because it launches with no browser chrome, but I notice that if I refresh the page while in app mode, I can see the URL both in the top window bar and the bottom-left status bar. Also, app mode doesn't prevent the user from opening Developer Tools, which makes viewing the URL trivial.
Any ideas welcome!
Is it possible to resize the Chrome window using the developer tool's console? If so, what would the command be? becuase the window.resizeTo(w,h) didn't work for me.
Official Chrome issue says:
By Design we don't support resize/move for tabs, only constrained windows.
Windows in Chrome can be resized via Chrome extensions API, however it's not available from console. You should probably try using one of many 'window resizing' extensions. In the near future it will be possible for extensions to add own console commands, however as for now it's an experimental feature.
i think you can only resize windows that's you have created from the console, like popups
for example:
var pop=window.open("","","width=1024,height=768");
pop.resizeTo(100,100);
On macOS you can run: open -a Google\ Chrome --args --window-size=1366,768
Since Firefox 7, it's no longer possible for a web site to change the default size of a window in a browser, according to the following rules:
You can't resize a window or tab that wasn’t created by window.open.
You can't resize a window or tab when it’s in a window with more than one tab.
found on https://developer.mozilla.org/en-US/docs/DOM/window.resizeTo#Notes
some try and error seems to prove that these rules also apply in Chrome.
While developing a chrome extension, when the extension shows as a new browser window all the browser toolbars (back, refresh, bookmarks, etc.) are visible. I've seen extensions that open with this method, but don't have their toolbars. Does anyone know how to remove the browser toolbars and show a stripped down window?
For an example, check out the Hootsuite extension.
Chrome API: chrome.windows.create({type:'popup', url:'...'}); (see documentation for more options, such as width, height, etc.).
To use this API, you need to specify the "tabs" permission in the manifest file.
The Chrome extension API is a superset of JavaScript. In JavaScript, window.open can be used to create a window. In a Chrome extension, this is also possible. Hootsuite also uses this method, as seen in the source code:
window.open(address, "hootlet",'scrollbars=0,toolbar=0,location=0,resizable=0,status=0,width=550,height=280');