From 0d948d5a88374a49e88624f508b9271e38f82bb4 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Thu, 17 Apr 2025 20:41:17 +0200 Subject: [PATCH] added mozilla support --- .gitignore | 2 ++ bin/build.sh | 26 ++++++++++++++++++++++++++ manifest.json => manifest-chrome.json | 8 ++------ manifest-firefox.json | 25 +++++++++++++++++++++++++ options.css | 1 + options.html | 2 +- popup.css | 1 + suspended.css | 1 + 8 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 .gitignore create mode 100644 bin/build.sh rename manifest.json => manifest-chrome.json (82%) create mode 100644 manifest-firefox.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..77b4a7d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +output +manifest.json \ No newline at end of file diff --git a/bin/build.sh b/bin/build.sh new file mode 100644 index 0000000..8d3340a --- /dev/null +++ b/bin/build.sh @@ -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 diff --git a/manifest.json b/manifest-chrome.json similarity index 82% rename from manifest.json rename to manifest-chrome.json index b7826e3..a9d5d5c 100644 --- a/manifest.json +++ b/manifest-chrome.json @@ -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" }, diff --git a/manifest-firefox.json b/manifest-firefox.json new file mode 100644 index 0000000..bf55738 --- /dev/null +++ b/manifest-firefox.json @@ -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" + } + } +} diff --git a/options.css b/options.css index 3db6b34..e1d9b2c 100644 --- a/options.css +++ b/options.css @@ -3,6 +3,7 @@ html { text-align: center; font-size: 130%; white-space: nowrap; + font-family: "Segoe UI", Tahoma, sans-serif; } body { margin: 0; diff --git a/options.html b/options.html index 87704c2..f7854d4 100644 --- a/options.html +++ b/options.html @@ -10,7 +10,7 @@

SleepyTabs

-
Version 1.4
+
Version 1.5
diff --git a/popup.css b/popup.css index 7e31080..e7b112b 100644 --- a/popup.css +++ b/popup.css @@ -2,6 +2,7 @@ html, body { padding: 0; margin: 0; font-size: 1em; + font-family: "Segoe UI", Tahoma, sans-serif; } a { text-decoration: none; diff --git a/suspended.css b/suspended.css index af27476..8b74c0d 100644 --- a/suspended.css +++ b/suspended.css @@ -4,6 +4,7 @@ html { font-size: 130%; text-align: center; padding: 75px; + font-family: "Segoe UI", Tahoma, sans-serif; } html > img {