update template

This commit is contained in:
2025-02-02 18:08:09 -06:00
parent f070c12273
commit a04e2bb9d1
575 changed files with 13430 additions and 55 deletions

View File

@@ -0,0 +1,47 @@
package webextension_polyfill.topsites;
typedef GetOptionsType = {
/**
The number of top sites to return, defaults to the value used by Firefox
Optional.
**/
@:optional
var limit : Float;
/**
Limit the result to a single top site link per domain
Optional.
**/
@:optional
var onePerDomain : Bool;
/**
Include sites that the user has blocked from appearing on the Firefox new tab.
Optional.
**/
@:optional
var includeBlocked : Bool;
/**
Include sites favicon if available.
Optional.
**/
@:optional
var includeFavicon : Bool;
/**
Include sites that the user has pinned on the Firefox new tab.
Optional.
**/
@:optional
var includePinned : Bool;
/**
Include search shortcuts appearing on the Firefox new tab.
Optional.
**/
@:optional
var includeSearchShortcuts : Bool;
/**
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.
Optional.
**/
@:optional
var newtab : Bool;
};

View File

@@ -0,0 +1,29 @@
package webextension_polyfill.topsites;
/**
An object encapsulating a most visited URL, such as the URLs on the new tab page.
**/
typedef MostVisitedURL = {
/**
The most visited URL.
**/
var url : String;
/**
The title of the page.
Optional.
**/
@:optional
var title : String;
/**
Data URL for the favicon, if available.
Optional.
**/
@:optional
var favicon : String;
/**
The entry type, either <code>url</code> for a normal page link, or <code>search</code> for a search shortcut.
Optional.
**/
@:optional
var type : MostVisitedURLTypeEnum;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.topsites;
/**
The entry type, either <code>url</code> for a normal page link, or <code>search</code> for a search shortcut.
**/
typedef MostVisitedURLTypeEnum = String;

View File

@@ -0,0 +1,8 @@
package webextension_polyfill.topsites;
typedef Static = {
/**
Gets a list of top sites.
**/
function get(?options:GetOptionsType):js.lib.Promise<Array<MostVisitedURL>>;
};