mirror of
https://github.com/alyssaxuu/omni.git
synced 2026-03-11 08:54:35 +00:00
Fix shortcut override
This commit is contained in:
parent
526699e1a9
commit
e33f3b2dd6
3 changed files with 14 additions and 4 deletions
|
|
@ -480,6 +480,11 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|||
case "restore-new-tab":
|
||||
restoreNewTab();
|
||||
break;
|
||||
case "close-omni":
|
||||
getCurrentTab().then((response) => {
|
||||
chrome.tabs.sendMessage(response.id, {request: "close-omni"});
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
var isOpen = false;
|
||||
document.onkeyup = (e) => {
|
||||
if (e.key == "Escape" && isOpen) {
|
||||
chrome.runtime.sendMessage({request:"close-omni"})
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
var isOpen = false;
|
||||
var actions = [];
|
||||
var isFiltered = false;
|
||||
|
||||
|
|
@ -25,7 +30,6 @@ $(document).ready(function(){
|
|||
|
||||
// Add actions to the omni
|
||||
function populateOmni() {
|
||||
console.log("check times");
|
||||
$("#omni-extension #omni-list").html("");
|
||||
actions.forEach(function(action, index){
|
||||
var keys = "";
|
||||
|
|
@ -67,7 +71,6 @@ $(document).ready(function(){
|
|||
keys += "</div>";
|
||||
}
|
||||
var img = "<img src='"+action.favIconUrl+"' alt='favicon' onerror='this.src=""+chrome.runtime.getURL("/assets/globe.svg")+""' class='omni-icon'>";
|
||||
console.log(action)
|
||||
if (action.emoji) {
|
||||
img = "<span class='omni-emoji-action'>"+action.emojiChar+"</span>"
|
||||
}
|
||||
|
|
@ -370,6 +373,8 @@ $(document).ready(function(){
|
|||
} else {
|
||||
openOmni();
|
||||
}
|
||||
} else if (message.request == "close-omni") {
|
||||
closeOmni();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Omni",
|
||||
"description": "Supercharge Chrome with commands, shortcuts, and more",
|
||||
"offline_enabled": true,
|
||||
"version": "1.3.6",
|
||||
"version": "1.3.7",
|
||||
"manifest_version": 3,
|
||||
"action": {
|
||||
"icons": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue