Chrome: remove window border / decoration
Is it possible somehow via a Chrome extension to remove most of the window border content (like address bar, tab bar)?
I'd like to have some standalone windows with some webpages inside but without any space wasted.
My purpose is for example to build a Chrome extension which strips everything out from the site except the Flash/video/whateverobject and scales that to the full size of the window. So I ge开发者_JS百科t a Chrome window with just the video inside and no space wasted on anything else (like address bar or tab bar or whatever). Similar as for example the VLC player window.
I searched a bit around but found nothing a like. Although I can remember that I have heard of something similar which Google called standalone web applications or so: Where you could create links on your desktop to web applications which just look like desktop applications because they don't have the address bar. But I cannot find this feature (or how to do this with my Chrome).
typing this in your console opens the current page in a new window, without the bookmark or the tab bars:
javascript:window.open(location.href, "detab", "toolbar=0"); window.close()
You can have your extension do the same.
The closest you can get with an extension is a window with a type popup
.
Using chrome.windows.create:
chrome.windows.create({url: "https://example.com", type: "popup"})
This will get rid of every window decoration except system title bar/borders.
A Chrome App can, potentially, go further. You can create a window without system borders:
chrome.app.window.create({
url: "page.html",
frame: { type: "none" },
innerBounds: { /* position and size */}
});
Note that you will have to implement things like draggable areas and a way to close the window yourself.
How about plain, old open(location, '_blank', 'fullscreen')
(as in window.open
)?
in manifest.json write example:
"app":{
"urls":["http://www.google.com"],
"launch":{
"web_url":"https://www.google.com/"
}
},
ctrl + f11 removes chrome window decorations, bookmark bar search bar etc.
精彩评论