Implement fetch (#4)

* Implement fetch & launch action
* Fix scroll behavior
* Remove horizontal scrollbar
* Add stubs for filling username / password
* Don't pre-filter for chrome:// URLs
* Add inject.js
This commit is contained in:
Erayd
2018-04-20 00:40:22 +12:00
committed by GitHub
parent 92f2ecea1b
commit 9ca48cea41
9 changed files with 175 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ function Interface(settings, logins) {
this.settings = settings;
this.logins = logins;
this.results = [];
this.active = true;
this.active = !settings.tab.url.match(/^chrome:\/\//);
this.searchPart = new SearchInterface(this);
// initialise with empty search
@@ -69,6 +69,7 @@ function view(ctl, params) {
result.doAction("fill");
},
onkeydown: function(e) {
e.preventDefault();
switch (e.code) {
case "ArrowDown":
if (e.target.nextSibling) {
@@ -87,6 +88,9 @@ function view(ctl, params) {
case "Enter":
result.doAction("fill");
break;
case "KeyG":
result.doAction("launch");
break;
}
}
},
@@ -104,7 +108,7 @@ function view(ctl, params) {
title: "Copy username",
onclick: function(e) {
e.stopPropagation();
result.doAction("copyUser");
result.doAction("copyUsername");
}
}),
m("div.action.launch", {