mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
fix custom shortcuts not showing up
This commit is contained in:
+17
-8
@@ -3026,15 +3026,24 @@ function SendHomePage() {
|
||||
// Adds the shortcuts to the shortcut container
|
||||
chrome.storage.local.get(["shortcuts"], function (result) {
|
||||
var shortcuts = Object.values(result)[0];
|
||||
|
||||
for (let i = 0; i < shortcuts.length; i++) {
|
||||
if (shortcuts[i].enabled) {
|
||||
let Itemname = shortcuts[i].name.replace(/ /g, "");
|
||||
createNewShortcut(
|
||||
ShortcutLinks[Itemname].link,
|
||||
ShortcutLinks[Itemname].icon,
|
||||
ShortcutLinks[Itemname].viewBox,
|
||||
shortcuts[i].name,
|
||||
);
|
||||
const currentShortcut = shortcuts[i];
|
||||
|
||||
if (currentShortcut?.enabled) {
|
||||
const Itemname = currentShortcut?.name;
|
||||
|
||||
const linkDetails = ShortcutLinks?.[Itemname];
|
||||
if (linkDetails) {
|
||||
createNewShortcut(
|
||||
linkDetails.link,
|
||||
linkDetails.icon,
|
||||
linkDetails.viewBox,
|
||||
Itemname
|
||||
);
|
||||
} else {
|
||||
console.warn(`No link details found for '${Itemname}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
AddCustomShortcutsToPage();
|
||||
|
||||
Reference in New Issue
Block a user