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