johny why johny why - 4 months ago 25
Javascript Question

How to add entry to Google Chrome fullscreen exceptions with javascript?

I would like to programmatically add an 'exception' entry to chrome's privacy-full screen settings? This setting is found here:
chrome://settings/contentExceptions#fullscreen

I looked in the chrome documentation, but i cannot find a solution:
https://developer.chrome.com/extensions/privacy

Thanks!

Xan Xan
Answer

You're looking at a wrong API. This is not a privacy setting, and it's governed by chrome.contentSettings API.

// Requires "contentSettings" permission
chrome.contentSettings.fullscreen.set({
  primaryPattern: "*://*.example.com/*",
  setting: "allow"
});