mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Make bookmark name configurable and change completion title
This commit is contained in:
parent
277de2314b
commit
cad52abee9
3 changed files with 7 additions and 2 deletions
|
@ -35,7 +35,7 @@ export class HistoryCompletionSource extends Completions.CompletionSourceFuse {
|
|||
super(
|
||||
["open", "tabopen", "winopen"],
|
||||
"HistoryCompletionSource",
|
||||
"History",
|
||||
"History and bookmarks",
|
||||
)
|
||||
|
||||
this._parent.appendChild(this.node)
|
||||
|
|
|
@ -93,7 +93,7 @@ export async function getCombinedHistoryBmarks(query: string): Promise<Array<{ti
|
|||
else combinedMap.set(page.url, {title: page.title, url: page.url, history: page})
|
||||
})
|
||||
|
||||
const score = x => (x.history ? frecency(x.history) : 0) - (x.bmark ? 1000 : 0)
|
||||
const score = x => (x.history ? frecency(x.history) : 0) - (x.bmark ? config.get("bmarkweight") : 0)
|
||||
|
||||
return Array.from(combinedMap.values()).sort((a, b) => score(a) - score(b))
|
||||
}
|
||||
|
|
|
@ -861,6 +861,11 @@ export class default_config {
|
|||
*/
|
||||
historyresults = 50
|
||||
|
||||
/**
|
||||
* When displaying bookmarks in history completions, how many page views to pretend they have.
|
||||
*/
|
||||
bmarkweight = 100
|
||||
|
||||
/**
|
||||
* Number of results that should be shown in completions. -1 for unlimited
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue