Add generic www pattern to open any website (#156)
* Add generic `www` pattern to open any website Opens a website in default browser, e.g. `www github.com` * fix(web): Ignore invalid URLs rather than panicking * Improved syntax for early return * Allow fetching icon even if query has no domain * Add icon for www web search query; fix whitespace * Default to https for www web plugin shortcut
This commit is contained in:
parent
643e39bd1b
commit
a12c131c26
2 changed files with 40 additions and 27 deletions
|
|
@ -87,10 +87,10 @@
|
|||
matches: ["lib"],
|
||||
queries: [(name: "Libraries.io", query: "libraries.io/search?q=")]
|
||||
),
|
||||
(
|
||||
matches: ["mdn"],
|
||||
queries: [(name: "Mozilla Developer Network", query: "developer.mozilla.org/search?q=")]
|
||||
),
|
||||
(
|
||||
matches: ["mdn"],
|
||||
queries: [(name: "Mozilla Developer Network", query: "developer.mozilla.org/search?q=")]
|
||||
),
|
||||
(
|
||||
matches: ["npm"],
|
||||
queries: [(name: "npm", query: "npmjs.com/search?q=")]
|
||||
|
|
@ -115,10 +115,10 @@
|
|||
matches: ["stack"],
|
||||
queries: [(name: "Stack Overflow", query: "stackoverflow.com/search?q=")]
|
||||
),
|
||||
(
|
||||
matches: ["sp", "startpage"],
|
||||
queries: [(name: "Startpage", query: "startpage.com/sp/search?query=")]
|
||||
),
|
||||
(
|
||||
matches: ["sp", "startpage"],
|
||||
queries: [(name: "Startpage", query: "startpage.com/sp/search?query=")]
|
||||
),
|
||||
(
|
||||
matches: ["twitch"],
|
||||
queries: [(name: "Twitch", query: "twitch.tv/search?term=")]
|
||||
|
|
@ -131,6 +131,14 @@
|
|||
matches: ["wiki"],
|
||||
queries: [(name: "Wikipedia", query: "wikipedia.org/w/index.php?search=")]
|
||||
),
|
||||
(
|
||||
matches: ["www"],
|
||||
queries: [(
|
||||
name: "Open Website",
|
||||
query: "https://",
|
||||
icon: "https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Crystal128-browser.svg/179px-Crystal128-browser.svg.png",
|
||||
)]
|
||||
),
|
||||
(
|
||||
matches: ["xaut", "arxauth", "arxivauthor"],
|
||||
queries: [(name: "ArXiv", query: "https://arxiv.org/search/?searchtype=author&source=header&query=")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue