Compare commits

...

5 Commits

Author SHA1 Message Date
Victor Timofei 4919863dd8
Set Brave default as default search engine 2021-12-12 18:58:54 +02:00
Maddison Hellstrom 9623762b5f
Set defaultSearchEngine to DuckDuckGo 2021-03-11 21:25:57 -08:00
Maddison Hellstrom 8588206ab2 Add Twitter search
Does not yet support suggestions.
2021-02-12 11:04:24 -08:00
Maddison Hellstrom 79efe429d3 [src:style] remove old comments 2021-02-06 07:19:50 -08:00
Maddison Hellstrom b6bc81314c [src:tweak] workaround external bug 2021-02-06 07:18:19 -08:00
4 changed files with 5254 additions and 5149 deletions

View File

@ -26,13 +26,19 @@ actions.getURLPath = ({ count = 0, domain = false } = {}) => {
}
actions.copyURLPath = ({ count, domain } = {}) => () =>
Clipboard.write(actions.getURLPath({ count, domain })) // TODO: use navigator.clipboard
Clipboard.write(actions.getURLPath({ count, domain }))
actions.copyOrgLink = () =>
Clipboard.write(`[[${util.getCurrentLocation("href")}][${document.title}]]`) // TODO: use navigator.clipboard
Clipboard.write(`[[${util.getCurrentLocation("href")}][${document.title}]]`)
actions.copyMarkdownLink = () =>
Clipboard.write(`[${document.title}](${util.getCurrentLocation("href")})`) // TODO: use navigator.clipboard
Clipboard.write(
// I mostly use this feature to paste links into my Neuron (github.com/srid/neuron) notes.
// Due to a bug in Neuron's markdown library (github.com/jgm/commonmark-hs/issues/52),
// the vertical bar character breaks lists and titles.
// As a workaround, we backslash-escape any vertical bar characters.
`[${document.title.replace("|", "\\|")}](${util.getCurrentLocation("href")})`,
)
actions.duplicateTab = () =>
actions.openLink(util.getCurrentLocation("href"), { newTab: true, active: false })()

View File

@ -644,6 +644,14 @@ completions.cp.callback = (response) => parseCrunchbase(response, (person) => {
// ****** Search Engines ****** //
// Brave Search
completions.bs = {
alias: "bs",
name: "bravesearch",
search: "https://search.brave.com/search?q=",
compl: "https://search.brave.com/api/suggest?q=",
}
// DuckDuckGo
completions.dd = {
alias: "dd",
@ -1090,6 +1098,13 @@ completions.hn.callback = (response) => {
})
}
// Twitter
completions.tw = {
alias: "tw",
name: "twitter",
search: "https://twitter.com/search?q=",
}
// Reddit
completions.re = {
alias: "re",

View File

@ -7,6 +7,7 @@ util.addSettings({
hintAlign: "left",
omnibarSuggestionTimeout: 500,
richHintsForKeystroke: 1,
defaultSearchEngine: "bs",
theme: `
body {
font-family: "DejaVu Sans", DejaVu, Arial, sans-serif;

10375
yarn.lock

File diff suppressed because it is too large Load Diff