From 344481111ce6d7c2803124b4650ede817a1e6a07 Mon Sep 17 00:00:00 2001 From: Luca Russo Date: Wed, 11 Sep 2024 09:39:38 +0200 Subject: [PATCH] v1.12.0 --- .gitignore | 3 + CHANGELOG.md | 80 +++++++++++++++++ README.md | 84 +----------------- .../crossoriginfix.json | 0 {assets => images}/beam-32.png | Bin {assets => images}/icon-48.png | Bin {assets => images}/icon-512-contrast.png | Bin {assets => images}/icon-512.png | Bin {assets => images}/icon-96.png | Bin {assets => images}/quaver-32.png | Bin {assets => images}/restore-32.png | Bin {assets => images}/trashcan-32.png | Bin manifest.json | 44 ++++----- {frontend => pages}/options.html | 23 +++-- {frontend => pages}/popup.html | 24 +++-- {frontend => pages}/style.css | 21 ++--- {frontend => scripts}/VolumeOptions.js | 0 scripts/background.js | 57 ++++++++++++ scripts/{boost.js => content.js} | 22 +++-- scripts/initialize.js | 16 ---- {frontend => scripts}/options.js | 17 +++- {frontend => scripts}/popup.js | 55 +++++++----- 22 files changed, 270 insertions(+), 176 deletions(-) create mode 100644 .gitignore create mode 100644 CHANGELOG.md rename {declarativerules => dnrrules}/crossoriginfix.json (100%) rename {assets => images}/beam-32.png (100%) rename {assets => images}/icon-48.png (100%) rename {assets => images}/icon-512-contrast.png (100%) rename {assets => images}/icon-512.png (100%) rename {assets => images}/icon-96.png (100%) rename {assets => images}/quaver-32.png (100%) rename {assets => images}/restore-32.png (100%) rename {assets => images}/trashcan-32.png (100%) rename {frontend => pages}/options.html (60%) rename {frontend => pages}/popup.html (73%) rename {frontend => pages}/style.css (91%) rename {frontend => scripts}/VolumeOptions.js (100%) create mode 100644 scripts/background.js rename scripts/{boost.js => content.js} (85%) delete mode 100644 scripts/initialize.js rename {frontend => scripts}/options.js (60%) rename {frontend => scripts}/popup.js (88%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e1fbc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +releases +zip.sh \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c8ddf93 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,80 @@ +## Changelog +_Note that any version might include a number of stylistic changes, which are often not documented to avoid cluttering the changelog_ + +- **v1.1.0**: +
- Added a hard limit to the volume slider, and options to modify it to some degree. +
- Added support to far more websites. +
- Fixed bug where the extension would outright mute some videos / not mute videos when set to 0%. +
- Fixed bug where reloading the extension would stack the volume boosts. +
- Fixed bug where the extension would glitch out when the tab doesn't have a domain (e.g. `about:addons`). + +- **v1.2.0**: +
- Made the volume sliders' wider and clearer. +
- Fixed bug where the limit would reset when refreshing the extension (by closing the browser). + +- **v1.3.0**: +
- Added support for media elements in iframes. +
- Fixed bug where long domain names would overflow the slider. + +- **v1.4.0**: +
- Added a mono/stereo sound option button. +
- Changed a lot of backend code, to make it easier to maintain. + +- **v1.5.0**: +
- Added a "Reset to default" button to the options page. +
- Added a "Hide local volume multiplier" checkbox to the options page. +
- Changed the add-on's name from "Volume Booster Without Dementia" to a less outlandish one. +
- Fixed bug where really short domain names would misalign the sliders. + +- **v1.6.0**: +
- Added a "Show only specific volume multiplier" selector to the options page. +
- Added a limit of 100 steps to the sliders, to reduce lag. + +- **v1.7.0**: +
- Downgraded to manifest v2, in order to require the `` permission. Functionality is unaffected. + - v1.7.1: +
- Reverted a few stylistic changes from v1.7.0. + - v1.7.2: +
- Removed unnecessary "Block content on any page" permission. + +- **v1.8.0**: +
- Reverted to manifest v3, and made the "Access your data for all websites" permission optional. Again. +
- Added a prompt when the extension needs to access data from domains in order to work. +
- Added an option to disable the prompt. + +- **v1.9.0**: +
- Added an option to add subdomains to the permission prompt' websites. +
- Added a "No media detected" message. +
- Removed permission prompt when no media elements are found on a page. + - v1.9.1: +
- Fixed bug where the disable permission prompt checkbox won't show the actual set state. +
- Fixed some settings wrong defaults. + - v1.9.2: +
- Fixed bug where the extension would create unnecessary & mute audio streams in the mixer. + - v1.9.3: +
- Fixed bug where the extension would create unnecessary audio streams for idle videos. + +- **v1.10.0**: +
- Added a 500ms interval on which the popup will refresh the found media source domains. +
- Fixed bug where unchecking all websites permissions and asking for them anyway would refresh the page. +
- Fixed bug where the extension would not ask for the iframe source permission when the video is in an iframe. + - v1.10.1: +
- Fixed bug where the permissions checkboxes would not work (removed refresh interval, was a bad idea). +
- Fixed bug where the extension would ask for "null" permissions. + - v1.10.2: +
- Fixed bug where the extension would not correctly parse urls with uncommon protocols. +
- Marked the option "disable any prompt" as deprecated. +
- Commented leftover debug logs. + +- **v1.11.0**: +
- Added a button to restore the global volume multiplier to the default value. +
- Removed the "disable any prompt" option. +
- Local volume multiplier is now domain-specific instead of subdomain-specific. +
- Fixed bug where redundant domains would show up (e.g. `www.example.com` and `example.com`). + - v1.11.1: +
- Fixed inclusion of garbage files in the extension. + +- **v1.12.0**: +
- Added a way to send cookies in the media request, to fix some websites (e.g. TikTok). +
- Added a "More information" button in the options. +
- Reverted to using a subdomain-specific local volume multiplier. \ No newline at end of file diff --git a/README.md b/README.md index a9c74bf..f56dc3f 100644 --- a/README.md +++ b/README.md @@ -3,96 +3,20 @@ Have you ever had that issue where a volume booster add-on would just forget wha This is a simple free & open-source add-on that allows you to boost the volume of any* page and will (thankfully) remember the volume you set it to. +*Its only (known) limitation is that it can't boost the volume of webpages which play DRM-protected content using JavaScript, such as Netflix and Spotify. + It has two sliders: a global one and a domain-specific one. You can delete the domain-specific volume multiplier by clicking the trash can icon next to the slider. In that case, the global one will be used. Clicking the note button will set the sound mode to either mono (♪) or stereo (♫). The default is stereo. You can also go to the add-on's option page to change the hard volume boost limit to any value between 100% and 1000% (as well as other stuff). This is useful if you want to prevent yourself from accidentally setting the volume to a very high value and consequently blowing your ears off. The default is 500%. -*Its only (known) limitation is that it can't boost the volume of webpages which play DRM-protected content using JavaScript, such as Netflix and Spotify. - _I am not responsible for any damage to your ears or headphones that may result from the add-on use. Use the add-on responsibly and ensure your headphones can handle the boosted volume levels._ -  ## Availability Available on the [Firefox Add-ons site](https://addons.mozilla.org/firefox/addon/better-volume-booster/) (AMO) - +
or directly on this GitHub repository's [releases](https://github.com/zWolfrost/Better-Volume-Booster/releases) page. -  ## Changelog -_Note that any version might include a number of stylistic changes, which are often not documented to avoid cluttering the changelog_ - -- **v1.1.0**: -
- Added a hard limit to the volume slider, and options to modify it to some degree. -
- Added support to far more websites. -
- Fixed bug where the extension would outright mute some videos / not mute videos when set to 0%. -
- Fixed bug where reloading the extension would stack the volume boosts. -
- Fixed bug where the extension would glitch out when the tab doesn't have a domain (e.g. `about:addons`). - -- **v1.2.0**: -
- Made the volume sliders' wider and clearer. -
- Fixed bug where the limit would reset when refreshing the extension (by closing the browser). - -- **v1.3.0**: -
- Added support for media elements in iframes. -
- Fixed bug where long domain names would overflow the slider. - -- **v1.4.0**: -
- Added a mono/stereo sound option button. -
- Changed a lot of backend code, to make it easier to maintain. - -- **v1.5.0**: -
- Added a "Reset to default" button to the options page. -
- Added a "Hide local volume multiplier" checkbox to the options page. -
- Changed the add-on's name from "Volume Booster Without Dementia" to a less outlandish one. -
- Fixed bug where really short domain names would misalign the sliders. - -- **v1.6.0**: -
- Added a "Show only specific volume multiplier" selector to the options page. -
- Added a limit of 100 steps to the sliders, to reduce lag. - -- **v1.7.0**: -
- Downgraded to manifest v2, in order to require the `` permission. Functionality is unaffected. - - v1.7.1: -
- Reverted a few stylistic changes from v1.7.0. - - v1.7.2: -
- Removed unnecessary "Block content on any page" permission. - -- **v1.8.0**: -
- Reverted to manifest v3, and made the "Access your data for all websites" permission optional. Again. -
- Added a prompt when the extension needs to access data from domains in order to work. -
- Added an option to disable the prompt. - -- **v1.9.0**: -
- Added an option to add subdomains to the permission prompt' websites. -
- Added a "No media detected" message. -
- Removed permission prompt when no media elements are found on a page. - - v1.9.1: -
- Fixed bug where the disable permission prompt checkbox won't show the actual set state. -
- Fixed some settings wrong defaults. - - v1.9.2: -
- Fixed bug where the extension would create unnecessary & mute audio streams in the mixer. - - v1.9.3: -
- Fixed bug where the extension would create unnecessary audio streams for idle videos. - -- **v1.10.0**: -
- Added a 500ms interval on which the popup will refresh the found media source domains. -
- Fixed bug where unchecking all websites permissions and asking for them anyway would refresh the page. -
- Fixed bug where the extension would not ask for the iframe source permission when the video is in an iframe. - - v1.10.1: -
- Fixed bug where the permissions checkboxes would not work (removed refresh interval, was a bad idea). -
- Fixed bug where the extension would ask for "null" permissions. - - v1.10.2: -
- Fixed bug where the extension would not correctly parse urls with uncommon protocols. -
- Marked the option "disable any prompt" as deprecated. -
- Commented leftover debug logs. - -- **v1.11.0**: -
- Added a button to restore the global volume multiplier to the default value. -
- Removed the "disable any prompt" option. -
- Local volume multiplier is now domain-specific instead of subdomain-specific. -
- Fixed bug where redundant domains would show up (e.g. `www.example.com` and `example.com`). -
- The code is actually somewhat readable now. - - v1.11.1: -
- Fixed inclusion of garbage files in the extension. +You can see the changes made in each version in the [CHANGELOG.md](CHANGELOG.md) file. \ No newline at end of file diff --git a/declarativerules/crossoriginfix.json b/dnrrules/crossoriginfix.json similarity index 100% rename from declarativerules/crossoriginfix.json rename to dnrrules/crossoriginfix.json diff --git a/assets/beam-32.png b/images/beam-32.png similarity index 100% rename from assets/beam-32.png rename to images/beam-32.png diff --git a/assets/icon-48.png b/images/icon-48.png similarity index 100% rename from assets/icon-48.png rename to images/icon-48.png diff --git a/assets/icon-512-contrast.png b/images/icon-512-contrast.png similarity index 100% rename from assets/icon-512-contrast.png rename to images/icon-512-contrast.png diff --git a/assets/icon-512.png b/images/icon-512.png similarity index 100% rename from assets/icon-512.png rename to images/icon-512.png diff --git a/assets/icon-96.png b/images/icon-96.png similarity index 100% rename from assets/icon-96.png rename to images/icon-96.png diff --git a/assets/quaver-32.png b/images/quaver-32.png similarity index 100% rename from assets/quaver-32.png rename to images/quaver-32.png diff --git a/assets/restore-32.png b/images/restore-32.png similarity index 100% rename from assets/restore-32.png rename to images/restore-32.png diff --git a/assets/trashcan-32.png b/images/trashcan-32.png similarity index 100% rename from assets/trashcan-32.png rename to images/trashcan-32.png diff --git a/manifest.json b/manifest.json index 3cd5940..0cbc3f0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,64 +1,54 @@ { "manifest_version": 3, "name": "Better Volume Booster", - "version": "1.11.1", - + "version": "1.12.0", "description": "Volume booster firefox extension that remembers your choices.", "icons": { - "48": "assets/icon-48.png", - "96": "assets/icon-96.png" + "48": "images/icon-48.png", + "96": "images/icon-96.png" }, "action": { - "default_popup": "frontend/popup.html" + "default_popup": "pages/popup.html" }, - "options_ui": { - "page": "frontend/options.html", + "page": "pages/options.html", "browser_style": false }, - - - "background": { - "scripts": ["scripts/initialize.js"] - }, - - - "declarative_net_request": { - "rule_resources": [{ - "id": "crossoriginfix", - "enabled": true, - "path": "declarativerules/crossoriginfix.json" - }] + "scripts": ["scripts/background.js"] }, - - - "content_scripts": [ { "matches": [ "" ], - "js": ["scripts/boost.js"], + "js": ["scripts/content.js"], "run_at": "document_start", "all_frames": true, "match_about_blank": true } ], + "declarative_net_request": { + "rule_resources": [{ + "id": "crossoriginfix", + "enabled": true, + "path": "dnrrules/crossoriginfix.json" + }] + }, + "optional_permissions": [ "" ], "permissions": [ "declarativeNetRequestWithHostAccess", "storage", - "scripting" + "scripting", + "cookies" ], - - "browser_specific_settings": { "gecko": { "id": "VolumeBoosterWithoutDementia@zWolfrost.github.com" diff --git a/frontend/options.html b/pages/options.html similarity index 60% rename from frontend/options.html rename to pages/options.html index c9246ba..c741d01 100644 --- a/frontend/options.html +++ b/pages/options.html @@ -3,8 +3,8 @@ - - + + @@ -17,7 +17,7 @@ -
+
+
+ + +
+
- +
+ +
- +
\ No newline at end of file diff --git a/frontend/popup.html b/pages/popup.html similarity index 73% rename from frontend/popup.html rename to pages/popup.html index 81f560a..1a23578 100644 --- a/frontend/popup.html +++ b/pages/popup.html @@ -3,8 +3,8 @@ - - + +