mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 22:19:02 +00:00
remove unnecessary async in worker
This commit is contained in:
parent
1acaac2484
commit
6fc767b5a2
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
async function focusMenu() {
|
function focusMenu() {
|
||||||
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
||||||
const url = chrome.runtime.getURL('repo/menu/menu.html'),
|
const url = chrome.runtime.getURL('repo/menu/menu.html'),
|
||||||
menu = tabs.find((tab) => tab.url.startsWith(url));
|
menu = tabs.find((tab) => tab.url.startsWith(url));
|
||||||
@ -17,7 +17,7 @@ async function focusMenu() {
|
|||||||
}
|
}
|
||||||
chrome.browserAction.onClicked.addListener(focusMenu);
|
chrome.browserAction.onClicked.addListener(focusMenu);
|
||||||
|
|
||||||
async function focusNotion() {
|
function focusNotion() {
|
||||||
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
||||||
const notion = tabs.find((tab) => {
|
const notion = tabs.find((tab) => {
|
||||||
const url = new URL(tab.url),
|
const url = new URL(tab.url),
|
||||||
@ -30,7 +30,7 @@ async function focusNotion() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reload() {
|
function reload() {
|
||||||
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT }, (tabs) => {
|
||||||
const menu = chrome.runtime.getURL('repo/menu/menu.html');
|
const menu = chrome.runtime.getURL('repo/menu/menu.html');
|
||||||
tabs.forEach((tab) => {
|
tabs.forEach((tab) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user