mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-07 05:59:02 +00:00
remove id from path to menu
This commit is contained in:
parent
c83003cfac
commit
a8ed96e09b
@ -16,7 +16,7 @@
|
|||||||
"browser_action": {},
|
"browser_action": {},
|
||||||
"background": { "scripts": ["worker.js"] },
|
"background": { "scripts": ["worker.js"] },
|
||||||
"options_ui": {
|
"options_ui": {
|
||||||
"page": "repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html",
|
"page": "repo/menu/menu.html",
|
||||||
"open_in_tab": true
|
"open_in_tab": true
|
||||||
},
|
},
|
||||||
"web_accessible_resources": ["env/*", "api/*", "dep/*", "media/*", "repo/*"],
|
"web_accessible_resources": ["env/*", "api/*", "dep/*", "media/*", "repo/*"],
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
|
|
||||||
async function focusMenu() {
|
async 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(
|
const url = chrome.runtime.getURL('repo/menu/menu.html'),
|
||||||
'repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html'
|
|
||||||
),
|
|
||||||
menu = tabs.find((tab) => tab.url.startsWith(url));
|
menu = tabs.find((tab) => tab.url.startsWith(url));
|
||||||
if (menu) {
|
if (menu) {
|
||||||
chrome.tabs.highlight({ 'tabs': menu.index });
|
chrome.tabs.highlight({ 'tabs': menu.index });
|
||||||
@ -34,9 +32,7 @@ async function focusNotion() {
|
|||||||
|
|
||||||
async function reload() {
|
async 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(
|
const menu = chrome.runtime.getURL('repo/menu/menu.html');
|
||||||
'repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html'
|
|
||||||
);
|
|
||||||
tabs.forEach((tab) => {
|
tabs.forEach((tab) => {
|
||||||
const url = new URL(tab.url),
|
const url = new URL(tab.url),
|
||||||
matches =
|
matches =
|
||||||
|
Loading…
Reference in New Issue
Block a user