|
|
@ -18,7 +18,7 @@ const reduceByPathname = (items, min) => { |
|
|
|
let pathname = item[1].origin + item[1].pathname; |
|
|
|
let pathname = item[1].origin + item[1].pathname; |
|
|
|
if (!hash[pathname]) { |
|
|
|
if (!hash[pathname]) { |
|
|
|
hash[pathname] = item; |
|
|
|
hash[pathname] = item; |
|
|
|
} else if (hash[pathname][1].visitCount < item[1].visitCount) { |
|
|
|
} else if (hash[pathname][1].href.length > item[1].href.length) { |
|
|
|
hash[pathname] = item; |
|
|
|
hash[pathname] = item; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -35,7 +35,7 @@ const reduceByOrigin = (items, min) => { |
|
|
|
let origin = item[1].origin; |
|
|
|
let origin = item[1].origin; |
|
|
|
if (!hash[origin]) { |
|
|
|
if (!hash[origin]) { |
|
|
|
hash[origin] = item; |
|
|
|
hash[origin] = item; |
|
|
|
} else if (hash[origin][1].visitCount < item[1].visitCount) { |
|
|
|
} else if (hash[origin][1].href.length > item[1].href.length) { |
|
|
|
hash[origin] = item; |
|
|
|
hash[origin] = item; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -46,7 +46,6 @@ const reduceByOrigin = (items, min) => { |
|
|
|
return filtered; |
|
|
|
return filtered; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getCompletions = (keyword) => { |
|
|
|
const getCompletions = (keyword) => { |
|
|
|
return browser.history.search({ |
|
|
|
return browser.history.search({ |
|
|
|
text: keyword, |
|
|
|
text: keyword, |
|
|
|