mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix up merge and add bun.lockb to gitignore
This commit is contained in:
+32
-9
@@ -2920,7 +2920,21 @@ function CreateCustomShortcutDiv(element) {
|
||||
shortcutdiv.classList.add("customshortcut");
|
||||
|
||||
let image = stringToHTML(
|
||||
`<svg viewBox="0 0 40 40" style="width:39px;height:39px"><text font-size="32" font-weight="bold" fill="var(--text-primary)" x="50%" y="50%" text-anchor="middle" dominant-baseline="central">${element.icon}</text></svg>`,
|
||||
`
|
||||
<svg style="width:39px;height:39px" viewBox="0 0 40 40" class="shortcuticondiv">
|
||||
<text
|
||||
text-anchor="middle"
|
||||
x="50%"
|
||||
y="50%"
|
||||
dy=".35em"
|
||||
fill="var(--text-primary)"
|
||||
font-weight="bold"
|
||||
font-size="32"
|
||||
dominant-baseline="middle">
|
||||
${element.icon}
|
||||
</text>
|
||||
</svg>
|
||||
`,
|
||||
).firstChild;
|
||||
image.classList.add("shortcuticondiv");
|
||||
var text = document.createElement("p");
|
||||
@@ -3076,15 +3090,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