tor-browser

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

top_sites.json (4325B)


      1 [
      2  {
      3    "namespace": "manifest",
      4    "types": [
      5      {
      6        "$extend": "OptionalPermission",
      7        "choices": [
      8          {
      9            "type": "string",
     10            "enum": ["topSites"]
     11          }
     12        ]
     13      }
     14    ]
     15  },
     16  {
     17    "namespace": "topSites",
     18    "description": "Use the chrome.topSites API to access the top sites that are displayed on the new tab page. ",
     19    "permissions": ["topSites"],
     20    "types": [
     21      {
     22        "id": "MostVisitedURL",
     23        "type": "object",
     24        "description": "An object encapsulating a most visited URL, such as the URLs on the new tab page.",
     25        "properties": {
     26          "url": {
     27            "type": "string",
     28            "description": "The most visited URL."
     29          },
     30          "title": {
     31            "type": "string",
     32            "optional": true,
     33            "description": "The title of the page."
     34          },
     35          "favicon": {
     36            "type": "string",
     37            "optional": true,
     38            "description": "Data URL for the favicon, if available."
     39          },
     40          "type": {
     41            "type": "string",
     42            "enum": ["url", "search"],
     43            "optional": true,
     44            "default": "url",
     45            "description": "The entry type, either <code>url</code> for a normal page link, or <code>search</code> for a search shortcut."
     46          }
     47        }
     48      }
     49    ],
     50    "functions": [
     51      {
     52        "name": "get",
     53        "type": "function",
     54        "description": "Gets a list of top sites.",
     55        "async": "callback",
     56        "parameters": [
     57          {
     58            "type": "object",
     59            "name": "options",
     60            "properties": {
     61              "providers": {
     62                "type": "array",
     63                "items": { "type": "string" },
     64                "deprecated": "Please use the other options to tune the results received from topSites.",
     65                "default": [],
     66                "optional": true
     67              },
     68              "limit": {
     69                "type": "integer",
     70                "default": 12,
     71                "maximum": 100,
     72                "minimum": 1,
     73                "optional": true,
     74                "description": "The number of top sites to return, defaults to the value used by Firefox"
     75              },
     76              "onePerDomain": {
     77                "type": "boolean",
     78                "default": true,
     79                "optional": true,
     80                "description": "Limit the result to a single top site link per domain"
     81              },
     82              "includeBlocked": {
     83                "type": "boolean",
     84                "default": false,
     85                "optional": true,
     86                "description": "Include sites that the user has blocked from appearing on the Firefox new tab."
     87              },
     88              "includeFavicon": {
     89                "type": "boolean",
     90                "default": false,
     91                "optional": true,
     92                "description": "Include sites favicon if available."
     93              },
     94              "includePinned": {
     95                "type": "boolean",
     96                "default": false,
     97                "optional": true,
     98                "description": "Include sites that the user has pinned on the Firefox new tab."
     99              },
    100              "includeSearchShortcuts": {
    101                "type": "boolean",
    102                "default": false,
    103                "optional": true,
    104                "description": "Include search shortcuts appearing on the Firefox new tab."
    105              },
    106              "newtab": {
    107                "type": "boolean",
    108                "default": false,
    109                "optional": true,
    110                "description": "Return the sites that exactly appear on the user's new-tab page. When true, all other options are ignored except limit and includeFavicon. If the user disabled newtab Top Sites, the newtab parameter will be ignored."
    111              }
    112            },
    113            "default": {},
    114            "optional": true
    115          },
    116          {
    117            "name": "callback",
    118            "type": "function",
    119            "parameters": [
    120              {
    121                "name": "results",
    122                "type": "array",
    123                "items": {
    124                  "$ref": "MostVisitedURL"
    125                }
    126              }
    127            ]
    128          }
    129        ]
    130      }
    131    ]
    132  }
    133 ]