2

I want a Chrome extension size to be in full inner window. This is my popup.js code. But it Max height is 600px and width is 800px approx after that it will give a scroll bar. Is it possible to get it in the full screen? In the documentation it is not clear, I also checked other stack questions, but no luck.

var height = window.screen.availHeight;
var width = window.screen.availWidth;
var x = document.getElementsByTagName("html")[0];
var y = document.getElementsByTagName("body")[0];
if (x && y) {
    x.style.height = height + "px";
    x.style.width = width + "px";
    y.style.height = height + "px";
    y.style.width = width + "px";
}
else{
    console.log("njknkj")
}

and below is my manifest.json code

{
  "manifest_version": 2,
  "name": "Robots",
  "description": "Robotics Solutions",
  "background": {
      "scripts": ["popup.js"],
      "persistent": false

  },
    "version": "1.0.0",
    "icons": { "16": "download.png" },
    "browser_action": {
    "default_icon": "download.png",
    "default_popup": "popup.html"
  },
  "minimum_chrome_version": "23",
  "permissions": ["activeTab"]
} 
Kate Orlova
  • 3,225
  • 5
  • 11
  • 35

0 Answers0