Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make chrome extension to be in full screen?

I am trying to make chrome extension to be in full screen, but the max I can do is half width. More then that it just give me a scroll bar in the bottom.. How can I make it to be in full screen? meaning, the whole width of the chrome browser? Thanks!

like image 286
EliK Avatar asked Jun 26 '12 14:06

EliK


People also ask

How do I make Chrome apps full screen?

Tapping the Menu button (three vertical dots) in the upper right-hand corner of the screen (or tap the hardware menu button on those devices having one) Selecting Add to homescreen from the menu. Tapping the Add button in the pop up dialog. Then, from the home screen, tap the app icon to open in fullscreen mode.

How do I get full screen instead of F11?

If you use a laptop or convertible device with an Fn key on the keyboard, you might have to press Fn + F11 instead of F11. An alternative way to get into full-screen mode in Google Chrome is to open its menu from the top-right side of the window.


2 Answers

chrome.windows.update(windowId, { state: "fullscreen" })

See http://developer.chrome.com/extensions/windows.html#method-update

like image 78
Vincent Scheib Avatar answered Sep 23 '22 13:09

Vincent Scheib


In your extensions "background.js" script:

chrome.app.runtime.onLaunched.addListener(function (launchData) {
  chrome.app.window.create(
    // Url
    '/editor.html',
    // CreateWindowOptions
    {
            'width': 400,
            'height': 500
    },
    // Callback
    function(win) {
        win.contentWindow.launchData = launchData;
        win.maximize();
        win.show();
    });
});
like image 35
Andrew Mackenzie Avatar answered Sep 22 '22 13:09

Andrew Mackenzie