PowerToys/doc/devdocs/modules/launcher/plugins/uri.md
Alekhya 0314b570cd
Dev Documentation of PowerToys Run (#7333)
* Architecture and  (#7267)

* Added debugging steps for PT Run

* Updated architecture markdown for launcher

* updated project architecture markdown for launcher

* Added telemetry docs for launcher

* Added the basic folder structure and files

* Added a basic overview of all common functionalities of the plugins

* Added information about the functioning of the calculator plugin

* update score section of overview

* added information about the uri plugin

* added info about the indexer plugin

* Added the documentation for the indexer plugin

* Added information about the program plugin

* Added info about the shell plugin

* updated some plugin info and added information about the ww plugin

* documenting the folder plugin

* updated window walker docs

* dev docs for the folder plugin

* added images to each of the plugins

* Added link to pt run documents

* fix typos and some minor corrections

* Add table of contents for pt run dev docs

* Fix image path and project link for Wox.plugin

Co-authored-by: Divyansh Srivastava <somm14divi@gmail.com>
2020-10-20 14:28:23 -07:00

1.5 KiB

URI Plugin

The URI Plugin, as the name suggests is used to dierctly run the URI that has been entered by the user as a query. This is done by parsing the entry and validating the URI, followed by executing it.

Image of URI plugin

URI Parser

  • The ExtendedUriParser.cs file tries to parse the user input and returns a System.Uri result by using the UriBuilder.
  • It also captures other cases which the UriBuilder does not handle such as when the input ends with a :, . or :/.

URI Resolver

  • The UriResolver.cs file returns true for Valid hosts.
  • Currently there is no additional logic for filtering out invalid hosts and it always returns true for a valid Uri that was created by parsing the user query. It can be expanded in the future to filter out certain hosts.

Default Browser Icon

  • The icon for each uri result is that of the default browser set by the user.
  • These details are obtained from the user registry and updated each time the theme of PT Run is changed.

Score

  • All uri plugin results have a score of 0 which indicates that they would show up after each of the other plugins, other than the indexer plugin which also has a score of 0.