-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch: Update extension codes and generate code with JsAccessPath att…
…ributes
- Loading branch information
1 parent
0b1ca00
commit 93ab5cf
Showing
338 changed files
with
1,870 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
using WebExtensions.Net.Menus; | ||
using JsBind.Net; | ||
using WebExtensions.Net.Menus; | ||
|
||
namespace WebExtensions.Net | ||
{ | ||
public partial interface IWebExtensionsApi | ||
{ | ||
/// <summary>The part of the menus API that is available in all extension contexts, including content scripts. Use the browser.contextMenus API to add items to the browser's menus. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.<br />Requires manifest permission menus, menus.</summary> | ||
[JsAccessPath("contextMenus")] | ||
IContextMenusApi ContextMenus { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,98 @@ | ||
using JsBind.Net; | ||
using System.Threading.Tasks; | ||
|
||
namespace WebExtensions.Net.ActionNs | ||
{ | ||
/// <summary>Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.</summary> | ||
[JsAccessPath("action")] | ||
public partial interface IActionApi | ||
{ | ||
/// <summary>Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.</summary> | ||
[JsAccessPath("onClicked")] | ||
OnClickedEvent OnClicked { get; } | ||
|
||
/// <summary>Disables the browser action for a tab.</summary> | ||
/// <param name="tabId">The id of the tab for which you want to modify the browser action.</param> | ||
[JsAccessPath("disable")] | ||
ValueTask Disable(int? tabId = null); | ||
|
||
/// <summary>Enables the browser action for a tab. By default, browser actions are enabled.</summary> | ||
/// <param name="tabId">The id of the tab for which you want to modify the browser action.</param> | ||
[JsAccessPath("enable")] | ||
ValueTask Enable(int? tabId = null); | ||
|
||
/// <summary>Gets the background color of the browser action badge.</summary> | ||
/// <param name="details"></param> | ||
/// <returns></returns> | ||
[JsAccessPath("getBadgeBackgroundColor")] | ||
ValueTask<ColorArray> GetBadgeBackgroundColor(Details details); | ||
|
||
/// <summary>Gets the badge text of the browser action. If no tab nor window is specified is specified, the global badge text is returned.</summary> | ||
/// <param name="details"></param> | ||
/// <returns></returns> | ||
[JsAccessPath("getBadgeText")] | ||
ValueTask<string> GetBadgeText(Details details); | ||
|
||
/// <summary>Gets the text color of the browser action badge.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("getBadgeTextColor")] | ||
ValueTask GetBadgeTextColor(Details details); | ||
|
||
/// <summary>Gets the html document set as the popup for this browser action.</summary> | ||
/// <param name="details"></param> | ||
/// <returns></returns> | ||
[JsAccessPath("getPopup")] | ||
ValueTask<string> GetPopup(Details details); | ||
|
||
/// <summary>Gets the title of the browser action.</summary> | ||
/// <param name="details"></param> | ||
/// <returns></returns> | ||
[JsAccessPath("getTitle")] | ||
ValueTask<string> GetTitle(Details details); | ||
|
||
/// <summary>Returns the user-specified settings relating to an extension's action.</summary> | ||
/// <returns>The collection of user-specified settings relating to an extension's action.</returns> | ||
[JsAccessPath("getUserSettings")] | ||
ValueTask<UserSettings> GetUserSettings(); | ||
|
||
/// <summary>Checks whether the browser action is enabled.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("isEnabled")] | ||
ValueTask IsEnabled(Details details); | ||
|
||
/// <summary>Opens the extension popup window in the specified window.</summary> | ||
/// <param name="options">An object with information about the popup to open.</param> | ||
[JsAccessPath("openPopup")] | ||
ValueTask OpenPopup(Options options = null); | ||
|
||
/// <summary>Sets the background color for the badge.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setBadgeBackgroundColor")] | ||
ValueTask SetBadgeBackgroundColor(SetBadgeBackgroundColorDetails details); | ||
|
||
/// <summary>Sets the badge text for the browser action. The badge is displayed on top of the icon.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setBadgeText")] | ||
ValueTask SetBadgeText(SetBadgeTextDetails details); | ||
|
||
/// <summary>Sets the text color for the badge.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setBadgeTextColor")] | ||
ValueTask SetBadgeTextColor(SetBadgeTextColorDetails details); | ||
|
||
/// <summary>Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the 'b'path'/b' or the 'b'imageData'/b' property must be specified.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setIcon")] | ||
ValueTask SetIcon(SetIconDetails details); | ||
|
||
/// <summary>Sets the html document to be opened as a popup when the user clicks on the browser action's icon.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setPopup")] | ||
ValueTask SetPopup(SetPopupDetails details); | ||
|
||
/// <summary>Sets the title of the browser action. This shows up in the tooltip.</summary> | ||
/// <param name="details"></param> | ||
[JsAccessPath("setTitle")] | ||
ValueTask SetTitle(SetTitleDetails details); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.