Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "conditional_entries" syntax #62

Open
myrdd opened this issue Sep 15, 2017 · 1 comment
Open

add "conditional_entries" syntax #62

myrdd opened this issue Sep 15, 2017 · 1 comment

Comments

@myrdd
Copy link
Member

myrdd commented Sep 15, 2017

suggested .json format extension: (example)

{
  "metadata":{
    "version":1,
    "serial":2017091501
  },
  "conditional_entries":[
    {
      "name": "uBlock origin",
      "conditions": [
        {
          "enabled_extensions": [
            {
              "id": "[email protected]",
              "type": "webextension"
            }
          ]
        }
      ],
      "entries":{
        "allow":[
          {
            "o":{"s":"moz-extension","h":"{extension_uuid}"},
            "d":{"s":"https","h":"*","port":"*"}
          }
        ]
      }
    }
  ]
}

or

{
  "metadata":{
    "version":1,
    "serial":2017091501
  },
  "conditional_entries":[
    {
      "name": "uBlock origin",
      "condition": {
        "enabled_extension": {
          "id": "[email protected]",
          "type": "webextension"
        }
      },
      "entries":{
        "allow":[
          {
            "o":{"s":"moz-extension","h":"{extension_uuid}"},
            "d":{"s":"https","h":"*","port":"*"}
          }
        ]
      }
    }
  ]
}

RP then needs to replace "{extension_uuid}" by the current UUID of the extension.

Btw, "conditional_entries" could be nested to allow for grouping.

I'm not sure if it's possible for WEs to retrieve the uuid. The uuid is stored in Extension.jsm [UUIDMap, Extension.uuid].

@myrdd
Copy link
Member Author

myrdd commented Sep 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant