mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
parent
f5699a1bf3
commit
eff86ce4ed
6 changed files with 40 additions and 7 deletions
|
@ -46,4 +46,10 @@ div {
|
|||
background-color: currentColor;
|
||||
mask-size: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.search {
|
||||
box-sizing: border-box;
|
||||
padding-left: calc(0.5em + 19px + 0.25em);
|
||||
cursor: initial;
|
||||
}
|
|
@ -79,5 +79,21 @@
|
|||
actionButton.addEventListener("click", action.action);
|
||||
actions.appendChild(actionButton);
|
||||
});
|
||||
|
||||
var search = document.createElement("input");
|
||||
search.placeholder = browser.i18n.getMessage("search");
|
||||
search.className = "search action";
|
||||
actions.appendChild(search);
|
||||
search.focus();
|
||||
|
||||
search.addEventListener("keyup", function(event){
|
||||
if ([10, 13].indexOf(event.keyCode) !== -1){
|
||||
window.open(browser.extension.getURL(
|
||||
"options/options.html" +
|
||||
"?search=" +
|
||||
encodeURIComponent(this.value)
|
||||
));
|
||||
}
|
||||
});
|
||||
});
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue