tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

trackingProtection.json (6226B)


      1 [
      2  {
      3    "namespace": "trackingProtection",
      4    "description": "experimental API allow requests through ETP",
      5    "events": [
      6      {
      7        "name": "onSmartBlockEmbedUnblock",
      8        "type": "function",
      9        "description": "Event used to pass an unblock message to a smartblock shim",
     10        "parameters": [
     11          {
     12            "name": "tabId",
     13            "type": "number",
     14            "description": "The id of the tab where the shim is running"
     15          },
     16          {
     17            "name": "shimId",
     18            "type": "string",
     19            "description": "The shim which should be unblocked"
     20          },
     21          {
     22            "name": "hostname",
     23            "type": "string",
     24            "description": "Hostname of the website"
     25          }
     26        ]
     27      },
     28      {
     29        "name": "onSmartBlockEmbedReblock",
     30        "type": "function",
     31        "description": "Event used to pass an reblock message to a smartblock shim",
     32        "parameters": [
     33          {
     34            "name": "tabId",
     35            "type": "number",
     36            "description": "The id of the tab where the shim is running"
     37          },
     38          {
     39            "name": "shimId",
     40            "type": "string",
     41            "description": "The shim which should be reblocked"
     42          },
     43          {
     44            "name": "hostname",
     45            "type": "string",
     46            "description": "Hostname of the website"
     47          }
     48        ]
     49      },
     50      {
     51        "name": "onPrivateSessionEnd",
     52        "type": "function",
     53        "description": "Event used to notify webcompat extension that it's time to clear PB state",
     54        "parameters": []
     55      }
     56    ],
     57    "functions": [
     58      {
     59        "name": "isDFPIActive",
     60        "type": "function",
     61        "description": "Returns whether dFPI is active for private/non-private browsing tabs",
     62        "parameters": [
     63          {
     64            "type": "boolean",
     65            "name": "isPrivate"
     66          }
     67        ],
     68        "async": true
     69      },
     70      {
     71        "name": "shim",
     72        "type": "function",
     73        "description": "Set specified URL patterns as intended to be shimmed",
     74        "parameters": [
     75          {
     76            "name": "allowlistId",
     77            "description": "Identfier for the allow-list, so it may be added-to or revoked",
     78            "type": "string"
     79          },
     80          {
     81            "name": "patterns",
     82            "description": "Array of match patterns",
     83            "type": "array",
     84            "items": {
     85              "type": "string"
     86            }
     87          },
     88          {
     89            "name": "notHosts",
     90            "description": "Hosts on which to not shim these patterns",
     91            "type": "array",
     92            "optional": true,
     93            "items": {
     94              "type": "string"
     95            }
     96          }
     97        ]
     98      },
     99      {
    100        "name": "allow",
    101        "type": "function",
    102        "description": "Set specified URL patterns as intended to be allowed through the content blocker for the specified top hosts",
    103        "parameters": [
    104          {
    105            "name": "allowlistId",
    106            "description": "Identfier for the allow-list, so it may be added-to or revoked",
    107            "type": "string"
    108          },
    109          {
    110            "name": "patterns",
    111            "description": "Array of match patterns",
    112            "type": "array",
    113            "items": {
    114              "type": "string"
    115            }
    116          },
    117          {
    118            "name": "isPrivate",
    119            "type": "boolean"
    120          },
    121          {
    122            "name": "hosts",
    123            "description": "Hosts to allow the patterns on",
    124            "type": "array",
    125            "items": {
    126              "type": "string"
    127            }
    128          }
    129        ],
    130        "async": true
    131      },
    132      {
    133        "name": "revoke",
    134        "type": "function",
    135        "description": "Revokes the given allow-list entirely (both shims and allows)",
    136        "parameters": [
    137          {
    138            "name": "allowListId",
    139            "type": "string"
    140          }
    141        ],
    142        "async": true
    143      },
    144      {
    145        "name": "clearResourceCache",
    146        "type": "function",
    147        "description": "Clear in-memory resource cache to reflect the changes to the allow-list for the subsequent requests",
    148        "parameters": [],
    149        "async": true
    150      },
    151      {
    152        "name": "wasRequestUnblocked",
    153        "type": "function",
    154        "description": "Whether the given requestId was unblocked by any allowList",
    155        "parameters": [
    156          {
    157            "name": "requestId",
    158            "type": "string"
    159          },
    160          {
    161            "name": "isPrivate",
    162            "type": "boolean"
    163          }
    164        ],
    165        "async": true
    166      },
    167      {
    168        "name": "openProtectionsPanel",
    169        "type": "function",
    170        "description": "Sends an observer message to open the protections panel on the window specified by the tab id",
    171        "parameters": [
    172          {
    173            "name": "tabId",
    174            "type": "number",
    175            "description": "the webcompat tab id of the calling tab, used to get the correct window"
    176          }
    177        ]
    178      },
    179      {
    180        "name": "incrementSmartblockEmbedShownTelemetry",
    181        "type": "function",
    182        "description": "Sends an observer message to inform protections panel that a embed was replaced on the window specified by the tab id",
    183        "parameters": []
    184      },
    185      {
    186        "name": "getSmartBlockEmbedFluentString",
    187        "type": "function",
    188        "description": "Gets the fluent strings used for the smartblock placeholder embed",
    189        "parameters": [
    190          {
    191            "name": "tabId",
    192            "type": "number",
    193            "description": "the webcompat tab id of the calling tab, used to get the correct window"
    194          },
    195          {
    196            "name": "shimId",
    197            "type": "string",
    198            "description": "the shimId of the calling shim, used for getting the correct embed name"
    199          },
    200          {
    201            "name": "websiteHost",
    202            "type": "string",
    203            "description": "the hostname of the website, displayed on the placeholder button"
    204          }
    205        ],
    206        "async": true
    207      }
    208    ]
    209  }
    210 ]