mirror of
https://github.com/alyssaxuu/omni.git
synced 2026-03-11 08:54:35 +00:00
Merge 01e4c46ba1 into 8bd26168ec
This commit is contained in:
commit
bf7329ea41
2 changed files with 10 additions and 8 deletions
|
|
@ -475,9 +475,11 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "search":
|
case "search":
|
||||||
chrome.search.query(
|
if (message.openInNewTab) {
|
||||||
{text:message.query}
|
chrome.search.query({ text: message.query, disposition: 'NEW_TAB' });
|
||||||
)
|
} else {
|
||||||
|
chrome.search.query({ text: message.query });
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "restore-new-tab":
|
case "restore-new-tab":
|
||||||
restoreNewTab();
|
restoreNewTab();
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ $(document).ready(() => {
|
||||||
window.open($(".omni-item-active").attr("data-url"), "_self");
|
window.open($(".omni-item-active").attr("data-url"), "_self");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
chrome.runtime.sendMessage({request:action.action, tab:action, query:$(".omni-extension input").val()});
|
chrome.runtime.sendMessage({ request: action.action, tab: action, query: $(".omni-extension input").val(), openInNewTab: e.ctrlKey || e.metaKey });
|
||||||
switch (action.action) {
|
switch (action.action) {
|
||||||
case "bookmark":
|
case "bookmark":
|
||||||
if (e.ctrlKey || e.metaKey) {
|
if (e.ctrlKey || e.metaKey) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue