Skip to content

Commit bfbb3dc

Browse files
committed
Add version display to popup with dynamic version retrieval
- Add version element to popup.html - Implement dynamic version fetching from manifest.json - Style version display in popup.css - Bump version to 1.9.3
1 parent 5965722 commit bfbb3dc

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.2
1+
1.9.3

css/popup.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,14 @@ input:checked + .slider:before {
250250
width: 24px;
251251
height: 24px;
252252
}
253+
254+
/* Version */
255+
.version {
256+
position: absolute;
257+
bottom: 16px;
258+
left: 50%;
259+
transform: translateX(-50%);
260+
font-size: 12px;
261+
color: var(--text-color);
262+
opacity: 0.7;
263+
}

popup.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ <h1>AWS Colorful Navbar</h1>
7676
<button id="theme-toggle" class="theme-toggle">
7777
<img src="icons/sun.ico" alt="Theme" class="icon" id="theme-icon">
7878
</button>
79+
<div class="version">v1.0.0</div>
7980
</div>
8081
<script src="popup.js"></script>
8182
</body>

popup.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ function createAccountEntry(accountId = '', accountName = '') {
2828
}
2929

3030
document.addEventListener('DOMContentLoaded', () => {
31+
// Set version from manifest
32+
fetch(chrome.runtime.getURL('manifest.json'))
33+
.then(response => response.json())
34+
.then(manifest => {
35+
document.querySelector('.version').textContent = `v${manifest.version}`;
36+
});
37+
3138
// Load saved settings
3239
chrome.storage.local.get('config', (c) => {
3340
const config = c.config !== undefined ? c.config : {};

0 commit comments

Comments
 (0)