1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-01-03 10:31:54 +01:00

Search in browser action did not work every time.

Fixes #268
This commit is contained in:
kkapsner 2018-10-09 20:44:13 +02:00
parent 9ae73d6a3e
commit ce3699a03c

View File

@ -86,13 +86,14 @@
actions.appendChild(search);
search.focus();
search.addEventListener("keyup", function(event){
search.addEventListener("keypress", function(event){
if ([10, 13].indexOf(event.keyCode) !== -1){
window.open(browser.extension.getURL(
"options/options.html" +
"?search=" +
encodeURIComponent(this.value)
));
window.close();
}
});
});