mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Ameliorate #454: allow historyresults to be configured
This commit is contained in:
parent
7e55762940
commit
4a8870c363
3 changed files with 8 additions and 1 deletions
|
@ -12,6 +12,7 @@ import * as Fuse from "fuse.js"
|
|||
import { enumerate } from "./itertools"
|
||||
import { toNumber } from "./convert"
|
||||
import * as Messaging from "./messaging"
|
||||
import * as config from "./config"
|
||||
import { browserBg } from "./lib/webext"
|
||||
|
||||
const DEFAULT_FAVICON = browser.extension.getURL("static/defaultFavicon.svg")
|
||||
|
@ -500,7 +501,7 @@ export class HistoryCompletionSource extends CompletionSourceFuse {
|
|||
// Search history, dedupe and sort by frecency
|
||||
let history = await browserBg.history.search({
|
||||
text: query,
|
||||
maxResults: 500,
|
||||
maxResults: Number(config.get("historyresults")),
|
||||
startTime: 0,
|
||||
})
|
||||
|
||||
|
|
|
@ -247,6 +247,11 @@ const DEFAULTS = o({
|
|||
browser: "firefox",
|
||||
nativeinstallcmd:
|
||||
"curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash",
|
||||
|
||||
// Performance related settings
|
||||
|
||||
// number of most recent results to ask Firefox for. We display the top 20 or so most frequently visited ones.
|
||||
historyresults: "50",
|
||||
})
|
||||
|
||||
/** Given an object and a target, extract the target if it exists, else return undefined
|
||||
|
|
|
@ -527,6 +527,7 @@ export async function reloadhard(n = 1) {
|
|||
|
||||
Related settings:
|
||||
"searchengine": "google" or any of [[SEARCH_URLS]]
|
||||
"historyresults": the n-most-recent results to ask Firefox for before they are sorted by frequency. Reduce this number if you find your results are bad.
|
||||
*/
|
||||
//#content
|
||||
export async function open(...urlarr: string[]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue