added mozilla support

This commit is contained in:
Mike Burns 2025-04-17 20:41:17 +02:00
parent 41464e2964
commit 0d948d5a88
8 changed files with 59 additions and 7 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
output
manifest.json

26
bin/build.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
VERSION=1.5
# Check if any arguments are passed
if [ $# -eq 0 ]; then
# Default targets if no arguments are given
targets=("chrome" "firefox")
else
# Use the provided arguments as targets
targets=("$@")
fi
# Iterate over each target
for target in "${targets[@]}"; do
# Remove old file if exists
rm "output/sleepytabs_${VERSION}_${target}.zip" 2>/dev/null
# Create a zip file excluding bin/* and ./manifest*.json
zip -r "output/sleepytabs_${VERSION}_${target}.zip" . -x ".git*" "bin*" "output*" "./manifest*.json"
# Copy the target-specific manifest file into the zip
cp "manifest-${target}.json" "manifest.json"
zip -u "output/sleepytabs_${VERSION}_${target}.zip" "manifest.json"
rm "manifest.json"
done

View File

@ -2,7 +2,7 @@
"name": "SleepyTabs",
"description": "Suspend tabs when not in use",
"homepage_url": "https://sleepytabs.app",
"version": "1.4",
"version": "1.5",
"manifest_version": 3,
"icons": {
"16": "icon16.png",
@ -12,11 +12,7 @@
"background": {
"service_worker": "service_worker.js"
},
"permissions": [
"alarms",
"storage",
"tabs"
],
"permissions": ["alarms", "storage", "tabs"],
"action": {
"default_popup": "popup.html"
},

25
manifest-firefox.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "SleepyTabs",
"description": "Suspend tabs when not in use",
"homepage_url": "https://sleepytabs.app",
"version": "1.5",
"manifest_version": 3,
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
"background": {
"scripts": ["service_worker.js"]
},
"permissions": ["alarms", "storage", "tabs"],
"action": {
"default_popup": "popup.html"
},
"options_page": "options.html",
"browser_specific_settings": {
"gecko": {
"id": "sleepy-tabs@sleepytabs.app"
}
}
}

View File

@ -3,6 +3,7 @@ html {
text-align: center;
font-size: 130%;
white-space: nowrap;
font-family: "Segoe UI", Tahoma, sans-serif;
}
body {
margin: 0;

View File

@ -10,7 +10,7 @@
<td colspan="2">
<img src="logo.svg" width="128" />
<h1>SleepyTabs</h1>
<h5>Version 1.4</h5>
<h5>Version 1.5</h5>
</td>
</tr>
<tr>

View File

@ -2,6 +2,7 @@ html, body {
padding: 0;
margin: 0;
font-size: 1em;
font-family: "Segoe UI", Tahoma, sans-serif;
}
a {
text-decoration: none;

View File

@ -4,6 +4,7 @@ html {
font-size: 130%;
text-align: center;
padding: 75px;
font-family: "Segoe UI", Tahoma, sans-serif;
}
html > img {