最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome: remove window borderdecoration - Stack Overflow

programmeradmin0浏览0评论

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 get 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).

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 get 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).

Share Improve this question edited Sep 3, 2014 at 9:09 Albert asked Jun 27, 2010 at 15:00 AlbertAlbert 68.1k68 gold badges252 silver badges401 bronze badges 12
  • Related (but not Chrome related): stackoverflow.com/questions/3026075/… – Pekka Commented Jun 27, 2010 at 15:06
  • How to create those links: click on the page icon on the top right, then the first entry of the menu... – Lucero Commented Jun 27, 2010 at 15:08
  • @Lucero: What menu entry exactly? I'm not sure if I have that here. My menu entries when I rightclick on the tab are: New tab, reload tab, duplicate, anchor, close, close other, close right tabs, open previously closed tab, save all tabs as bookmarks. – Albert Commented Jun 27, 2010 at 15:21
  • 1 @Lucero: I don't have that option here in that menu. I have version 6.0.447.0 dev (Mac build). Is that version too new / old? Or is that feature not available on Mac? Or is it in some other menu? (But I cannot remember that I ever have seen it anywhere.) – Albert Commented Jun 28, 2010 at 1:50
  • 2 @Albert, I've made an extension that does exactly this, qtax.se/resizetomedia :-) Will update it soon with some more useful features. – Qtax Commented Mar 13, 2012 at 1:23
 |  Show 7 more comments

5 Answers 5

Reset to default 8

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.

发布评论

评论列表(0)

  1. 暂无评论