How to enable google chrome chrome://flags/ values using javascript?

后端 未结 2 1073
孤城傲影
孤城傲影 2020-12-31 14:43

I want to enable google chrome flags enable using JavaScript.If flags enable then no action require, if disable then make it enable .

2条回答
  •  滥情空心
    2020-12-31 15:14

    local state file contains setting of flags(This is text file in json format)

    Chrome user directory location

    "browser": {
          "enabled_labs_experiments": [ "load-cloud-policy-on-signin", "old-checkbox-style" ],
          "last_redirect_origin": ""
       }
    

    "enabled_labs_experiments" attribute contains value of such flags which user enabled manually.In your case you have to first check your preferred flag entry is available or not if not then you have to add your flag in this file by javascript.

    Using javascript you can read and edit text files so read that file from specified location as per operating system and edit that file.

提交回复
热议问题