mirror of
https://github.com/DevJSTAR/JSTAR-Tab.git
synced 2025-04-18 17:35:26 +00:00
Update shortcuts.js
This commit is contained in:
parent
a872db13a2
commit
8a326c7cdb
|
@ -255,7 +255,15 @@ const shortcuts = {
|
||||||
}
|
}
|
||||||
} else if (action === 'delete') {
|
} else if (action === 'delete') {
|
||||||
shortcuts.remove(index);
|
shortcuts.remove(index);
|
||||||
}
|
} else if (action === 'open-new-tab') {
|
||||||
|
const currentShortcuts = Storage.get('shortcuts') || [];
|
||||||
|
const shortcut = currentShortcuts[index];
|
||||||
|
|
||||||
|
// Open the URL of the shortcut in a new tab
|
||||||
|
if (shortcut && shortcut.url) {
|
||||||
|
window.open(shortcut.url, '_blank');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contextMenu.classList.add('hidden');
|
contextMenu.classList.add('hidden');
|
||||||
});
|
});
|
||||||
|
@ -263,4 +271,4 @@ const shortcuts = {
|
||||||
|
|
||||||
shortcuts.render();
|
shortcuts.render();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user