Skip to content

Commit e003f22

Browse files
committed
Added bookmarks to search results
1 parent 3ed79b5 commit e003f22

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

script.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ function initSearchBar() {
149149
}
150150
}
151151

152+
for (var key in BOOKMARKS) {
153+
if (key.indexOf(this.value) === 0) {
154+
var start_with = key.match(/[^/]+\/\/(www\.)?/)[1];
155+
156+
results.push([
157+
key.replace(start_with, ''),
158+
0,
159+
start_with
160+
]);
161+
}
162+
}
163+
152164
results = sort(results, 1);
153165

154166
results = results.slice(0, 6);

0 commit comments

Comments
 (0)