Skip to content

Commit

Permalink
Merge pull request #1 from WebSnke/v.1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
WebSnke authored May 25, 2023
2 parents e523b5e + 9cb0849 commit 02f96d4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
Binary file added images/eshop-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/settings-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.1",
"version": "1.0.2",
"manifest_version": 2,
"author": "WebSnke",
"name": "Nintendo 3DS Music",
Expand All @@ -25,7 +25,6 @@
"scripts": [
"/scripts/background.js"
],
"type": "module",
"persistent": true
}
}
}
6 changes: 3 additions & 3 deletions pages/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
<body>
<main>
<form>
<label class="blue">Settings music</label>
<label class="blue" tabindex="0">Settings music</label>
<select id="settings-select" multiple>
<option value="amiibo-settings.mp3" selected>Amiibo - Settings</option>
<option value="miiverse-settings.mp3">Miiverse - Settings</option>
<option value="settings-main.mp3">System Settings - Main Theme</option>
<option value="settings-internet.mp3">System Settings - Internet Settings</option>
</select>
<label class="orange">Shopping music</label>
<label class="orange" tabindex="0">Shopping music</label>
<select id="shopping-select" multiple>
<option value="eShop-alternative.mp3" selected>Nintendo eShop - Alternative</option>
<option value="eShop-main.mp3">Nintendo eShop - Main Theme</option>
<option value="eShop-purchase.mp3">Nintendo <span class="orange">eShop</span> - Software
Purchase</option>
<option value="eShop-wish.mp3">Nintendo eShop - Wish List</option>
</select>
<label>Volume</label>
<label tabindex="0">Volume</label>
<input id="volume-slider" type="range" min="0" max="100" value="20" step="1">
</form>
</main>
Expand Down
10 changes: 8 additions & 2 deletions scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ setInterval(() => {
audio.play();
navigator.mediaSession.metadata = new MediaMetadata({
title: 'Settings',
artist: 'Nintendo 3DS Music'
artist: 'Nintendo 3DS Music',
artwork: [
{ src: '/images/settings-icon.png', sizes: '256x256', type: 'image/png' }
]
});
};
} else if (regex.shopping.test(url)) {
Expand All @@ -32,7 +35,10 @@ setInterval(() => {
audio.play();
navigator.mediaSession.metadata = new MediaMetadata({
title: 'Shopping',
artist: 'Nintendo 3DS Music'
artist: 'Nintendo 3DS Music',
artwork: [
{ src: '/images/eshop-icon.png', sizes: '256x256', type: 'image/png' }
]
});
};
} else if (!regex.settings.test(url) && !regex.shopping.test(url) && !audio.paused && !audio.src.includes(audioSource.health)) {
Expand Down
7 changes: 4 additions & 3 deletions styles/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

body {
font-family: Arial, Helvetica, sans-serif;
min-width: 233px;
margin: auto;
max-width: 233px;
padding: var(--width);
--black: rgb(0, 0, 0);
--blue: rgb(0, 157, 209);
Expand Down Expand Up @@ -75,15 +76,15 @@ select,
display: grid;
}

.button,
.button a {
color: var(--gray);
text-align: center;
text-decoration: none;
transition: 0.5s;
width: 100%;
}

.button a:hover {
:is(.button, .button a):hover {
color: var(--black);
transition: 0.5s;
}
Expand Down

0 comments on commit 02f96d4

Please sign in to comment.