Fixed resource linking

main
Nes370 2024-08-08 14:49:18 -07:00
parent 799fc55a8a
commit 70ff5bbad4
3 changed files with 28 additions and 11 deletions

View File

@ -11,13 +11,19 @@
"96": "icons/icon_96.png", "96": "icons/icon_96.png",
"128": "icons/icon_128.png" "128": "icons/icon_128.png"
}, },
"permissions": [
"storage"
],
"browser_specific_settings": {
"gecko": {
"id": "sgdb-extension@goblincave.synology.me",
"update_url": "https://gitea.goblincave.synology.me/Nes/SGDB-Extension/releases"
}
},
"action": { "action": {
"default_icon": "icons/icon_128.png", "default_icon": "icons/icon_128.png",
"default_popup": "popup.html" "default_popup": "popup.html"
}, },
"permissions": [
"storage"
],
"content_scripts": [ "content_scripts": [
{ {
"matches": [ "*://store.steampowered.com/app/*", "*://steamcommunity.com/app/*" ], "matches": [ "*://store.steampowered.com/app/*", "*://steamcommunity.com/app/*" ],

View File

@ -4,9 +4,10 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link rel="icon" href="icons/icon_128.png"> <link rel="icon" href="icons/icon_128.png">
<title>SGBD Button Placement</title> <title>SGBD Button on Steam</title>
<style> <style>
body { body {
text-align: center;
font-family: "Open Sans", sans-serif; font-family: "Open Sans", sans-serif;
background-color: #32414c; background-color: #32414c;
color: #8ecaf4; color: #8ecaf4;
@ -40,21 +41,30 @@
height: 22px; height: 22px;
} }
</style> </style>
<script>
document.addEventListener("DOMContentLoaded", function() {
const headerIcon = cotument.querySelector("#sgdb-icon");
const nesIcon = document.querySelector("#nes-icon");
const giteaIcon = document.createElement("#gitea-icon");
headerIcon.src = browser.runtime.getURL("icons/icon_32.png");
nesIcon.src = browser.runtime.getURL("icons/nes_32.png");
giteaIcon.src = browser.runtime.getURL("icons/gitea_32.png");
});
</script>
</head> </head>
<body> <body>
<h2 style="text-align: center"><img src="moz-extension://74d32219-b2a6-4a7f-bec5-0b89b0441173/icons/icon_32.png" style="vertical-align: middle; display: inline"> SGBD Button on Steam</h2> <h2>
<img id="header-icon" src="" style="vertical-align: middle; display: inline"> SGBD Button on Steam
</h2>
<a class="btn" href="https://www.steamgriddb.com/profile/76561198274324627"> <a class="btn" href="https://www.steamgriddb.com/profile/76561198274324627">
<span data-tooltip-text="View my profile"> <span data-tooltip-text="View my profile">
<img class="icon" src="moz-extension://74d32219-b2a6-4a7f-bec5-0b89b0441173/icons/nes_32.png">Created by <span style="color: #FC2A7C">Nes</span> <img id="nes-icon" class="icon" src="">Created by <span style="color: #FC2A7C">Nes</span>
</span> </span>
</a> </a>
<a class="btn" href="https://gitea.goblincave.synology.me/Nes/SGDB-Extension"> <a class="btn" href="https://gitea.goblincave.synology.me/Nes/SGDB-Extension">
<span data-tooltip-text="View source"> <span data-tooltip-text="View source">
<img class="icon" src="moz-extension://74d32219-b2a6-4a7f-bec5-0b89b0441173/icons/gitea_32.png">View Source <img id="gitea-icon" class="icon" src="">View Source
</span> </span>
</a> </a>
</body> </body>
</html> </html>

View File

@ -13,7 +13,7 @@ if(appIDMatch) {
const icon = document.createElement("img"); const icon = document.createElement("img");
icon.className = "ico16"; icon.className = "ico16";
icon.src = "moz-extension://74d32219-b2a6-4a7f-bec5-0b89b0441173/icons/sgdb_16.png"; icon.src = browser.runtime.getURL("icons/sgdb_16.png");
icon.style.backgroundImage = "none"; icon.style.backgroundImage = "none";
span.append(icon); span.append(icon);
@ -22,6 +22,7 @@ if(appIDMatch) {
const buttonContainer = document.querySelector(".apphub_OtherSiteInfo"); const buttonContainer = document.querySelector(".apphub_OtherSiteInfo");
if(buttonContainer) { if(buttonContainer) {
sgdb_button.style.marginRight = "3px"; sgdb_button.style.marginRight = "3px";
sgdb_button.style.marginLeft = "3px";
buttonContainer.prepend(sgdb_button); buttonContainer.prepend(sgdb_button);
} }