Skip to content

Commit

Permalink
v1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zWolfrost committed Sep 11, 2024
1 parent ebe0f7b commit 3444811
Show file tree
Hide file tree
Showing 22 changed files with 270 additions and 176 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode
releases
zip.sh
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**:
<br>- Added a hard limit to the volume slider, and options to modify it to some degree.
<br>- Added support to far more websites.
<br>- Fixed bug where the extension would outright mute some videos / not mute videos when set to 0%.
<br>- Fixed bug where reloading the extension would stack the volume boosts.
<br>- Fixed bug where the extension would glitch out when the tab doesn't have a domain (e.g. `about:addons`).

- **v1.2.0**:
<br>- Made the volume sliders' wider and clearer.
<br>- Fixed bug where the limit would reset when refreshing the extension (by closing the browser).

- **v1.3.0**:
<br>- Added support for media elements in iframes.
<br>- Fixed bug where long domain names would overflow the slider.

- **v1.4.0**:
<br>- Added a mono/stereo sound option button.
<br>- Changed a lot of backend code, to make it easier to maintain.

- **v1.5.0**:
<br>- Added a "Reset to default" button to the options page.
<br>- Added a "Hide local volume multiplier" checkbox to the options page.
<br>- Changed the add-on's name from "Volume Booster Without Dementia" to a less outlandish one.
<br>- Fixed bug where really short domain names would misalign the sliders.

- **v1.6.0**:
<br>- Added a "Show only specific volume multiplier" selector to the options page.
<br>- Added a limit of 100 steps to the sliders, to reduce lag.

- **v1.7.0**:
<br>- Downgraded to manifest v2, in order to require the `<all_urls>` permission. Functionality is unaffected.
- v1.7.1:
<br>- Reverted a few stylistic changes from v1.7.0.
- v1.7.2:
<br>- Removed unnecessary "Block content on any page" permission.

- **v1.8.0**:
<br>- Reverted to manifest v3, and made the "Access your data for all websites" permission optional. Again.
<br>- Added a prompt when the extension needs to access data from domains in order to work.
<br>- Added an option to disable the prompt.

- **v1.9.0**:
<br>- Added an option to add subdomains to the permission prompt' websites.
<br>- Added a "No media detected" message.
<br>- Removed permission prompt when no media elements are found on a page.
- v1.9.1:
<br>- Fixed bug where the disable permission prompt checkbox won't show the actual set state.
<br>- Fixed some settings wrong defaults.
- v1.9.2:
<br>- Fixed bug where the extension would create unnecessary & mute audio streams in the mixer.
- v1.9.3:
<br>- Fixed bug where the extension would create unnecessary audio streams for idle videos.

- **v1.10.0**:
<br>- Added a 500ms interval on which the popup will refresh the found media source domains.
<br>- Fixed bug where unchecking all websites permissions and asking for them anyway would refresh the page.
<br>- Fixed bug where the extension would not ask for the iframe source permission when the video is in an iframe.
- v1.10.1:
<br>- Fixed bug where the permissions checkboxes would not work (removed refresh interval, was a bad idea).
<br>- Fixed bug where the extension would ask for "null" permissions.
- v1.10.2:
<br>- Fixed bug where the extension would not correctly parse urls with uncommon protocols.
<br>- Marked the option "disable any prompt" as deprecated.
<br>- Commented leftover debug logs.

- **v1.11.0**:
<br>- Added a button to restore the global volume multiplier to the default value.
<br>- Removed the "disable any prompt" option.
<br>- Local volume multiplier is now domain-specific instead of subdomain-specific.
<br>- Fixed bug where redundant domains would show up (e.g. `www.example.com` and `example.com`).
- v1.11.1:
<br>- Fixed inclusion of garbage files in the extension.

- **v1.12.0**:
<br>- Added a way to send cookies in the media request, to fix some websites (e.g. TikTok).
<br>- Added a "More information" button in the options.
<br>- Reverted to using a subdomain-specific local volume multiplier.
84 changes: 4 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._

&nbsp;
## Availability
Available on the [Firefox Add-ons site](https://addons.mozilla.org/firefox/addon/better-volume-booster/) (AMO)

<br>
or directly on this GitHub repository's [releases](https://github.com/zWolfrost/Better-Volume-Booster/releases) page.

&nbsp;
## 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**:
<br>- Added a hard limit to the volume slider, and options to modify it to some degree.
<br>- Added support to far more websites.
<br>- Fixed bug where the extension would outright mute some videos / not mute videos when set to 0%.
<br>- Fixed bug where reloading the extension would stack the volume boosts.
<br>- Fixed bug where the extension would glitch out when the tab doesn't have a domain (e.g. `about:addons`).

- **v1.2.0**:
<br>- Made the volume sliders' wider and clearer.
<br>- Fixed bug where the limit would reset when refreshing the extension (by closing the browser).

- **v1.3.0**:
<br>- Added support for media elements in iframes.
<br>- Fixed bug where long domain names would overflow the slider.

- **v1.4.0**:
<br>- Added a mono/stereo sound option button.
<br>- Changed a lot of backend code, to make it easier to maintain.

- **v1.5.0**:
<br>- Added a "Reset to default" button to the options page.
<br>- Added a "Hide local volume multiplier" checkbox to the options page.
<br>- Changed the add-on's name from "Volume Booster Without Dementia" to a less outlandish one.
<br>- Fixed bug where really short domain names would misalign the sliders.

- **v1.6.0**:
<br>- Added a "Show only specific volume multiplier" selector to the options page.
<br>- Added a limit of 100 steps to the sliders, to reduce lag.

- **v1.7.0**:
<br>- Downgraded to manifest v2, in order to require the `<all_urls>` permission. Functionality is unaffected.
- v1.7.1:
<br>- Reverted a few stylistic changes from v1.7.0.
- v1.7.2:
<br>- Removed unnecessary "Block content on any page" permission.

- **v1.8.0**:
<br>- Reverted to manifest v3, and made the "Access your data for all websites" permission optional. Again.
<br>- Added a prompt when the extension needs to access data from domains in order to work.
<br>- Added an option to disable the prompt.

- **v1.9.0**:
<br>- Added an option to add subdomains to the permission prompt' websites.
<br>- Added a "No media detected" message.
<br>- Removed permission prompt when no media elements are found on a page.
- v1.9.1:
<br>- Fixed bug where the disable permission prompt checkbox won't show the actual set state.
<br>- Fixed some settings wrong defaults.
- v1.9.2:
<br>- Fixed bug where the extension would create unnecessary & mute audio streams in the mixer.
- v1.9.3:
<br>- Fixed bug where the extension would create unnecessary audio streams for idle videos.

- **v1.10.0**:
<br>- Added a 500ms interval on which the popup will refresh the found media source domains.
<br>- Fixed bug where unchecking all websites permissions and asking for them anyway would refresh the page.
<br>- Fixed bug where the extension would not ask for the iframe source permission when the video is in an iframe.
- v1.10.1:
<br>- Fixed bug where the permissions checkboxes would not work (removed refresh interval, was a bad idea).
<br>- Fixed bug where the extension would ask for "null" permissions.
- v1.10.2:
<br>- Fixed bug where the extension would not correctly parse urls with uncommon protocols.
<br>- Marked the option "disable any prompt" as deprecated.
<br>- Commented leftover debug logs.

- **v1.11.0**:
<br>- Added a button to restore the global volume multiplier to the default value.
<br>- Removed the "disable any prompt" option.
<br>- Local volume multiplier is now domain-specific instead of subdomain-specific.
<br>- Fixed bug where redundant domains would show up (e.g. `www.example.com` and `example.com`).
<br>- The code is actually somewhat readable now.
- v1.11.1:
<br>- Fixed inclusion of garbage files in the extension.
You can see the changes made in each version in the [CHANGELOG.md](CHANGELOG.md) file.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
44 changes: 17 additions & 27 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -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": [
"<all_urls>"
],
"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": [
"<all_urls>"
],
"permissions": [
"declarativeNetRequestWithHostAccess",
"storage",
"scripting"
"scripting",
"cookies"
],



"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
Expand Down
23 changes: 16 additions & 7 deletions frontend/options.html → pages/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<script src="VolumeOptions.js"></script>
<script defer src="options.js"></script>
<script src="../scripts/VolumeOptions.js"></script>
<script defer src="../scripts/options.js"></script>
</head>

<body>
Expand All @@ -17,7 +17,7 @@
<label for="volume-multiplier-limit-range" class="hide">Volume multiplier limit</label>
</div>

<div class="option centered">
<div class="option">
<label for="show-volume-multiplier-select">Show only a specific volume multiplier (when possible):</label>
<select id="show-volume-multiplier-select" name="show-volume-multiplier-select">
<option value="both">Show both</option>
Expand All @@ -26,16 +26,25 @@
</select>
</div>

<div class="option">
<label for="send-cookies-select">Send cookies in the media requests:</label>
<select id="send-cookies-select" name="send-cookies-select">
<option value="always">Always (not recommended!)</option>
<option value="ask">Ask</option>
<option value="never">Never</option>
</select>
</div>

<div class="option">
<input type="checkbox" id="include-permission-subdomain-checkbox" name="include-permission-subdomain-checkbox"/>
<label for="include-permission-subdomain-checkbox">Include websites subdomain in the permission prompt (when possible)</label>
<label for="include-permission-subdomain-checkbox">Include website subdomains in the permission prompt (when possible)</label>
</div>

<button id="more-information-button" class="button" style="margin: 5px; float: right;">More information...</button>
</div>

<footer>
<button id="reset-storage-button" class="button">
CLEAR ALL STORAGE AND RESET ALL SETTINGS TO DEFAULT
</button>
<button id="reset-storage-button" class="button">RESET ALL SETTINGS TO DEFAULT</button>
</footer>
</body>
</html>
24 changes: 19 additions & 5 deletions frontend/popup.html → pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<script src="VolumeOptions.js"></script>
<script defer src="popup.js"></script>
<script src="../scripts/VolumeOptions.js"></script>
<script defer src="../scripts/popup.js"></script>
<style>
body
{
Expand All @@ -17,7 +17,7 @@
<body>
<div class="container">
<div class="option">
<a id="restore-global-volume-multiplier" class="restore"><img src="../assets/restore-32.png" alt="Restore Global Volume Multiplier" width="16px" draggable="false"/></a>
<a id="restore-global-volume-multiplier" class="restore"><img src="../images/restore-32.png" alt="Restore Global Volume Multiplier" width="16px" draggable="false"/></a>
<a id="flip-global-sound-mode" class="note beam"><img alt="Flip Global Sound Mode" width="16px" draggable="false"/></a>

<input type="number" id="global-volume-multiplier-counter" min="0" step="1"/>
Expand All @@ -28,7 +28,7 @@
<label for="global-volume-multiplier-range">Global volume</label>
</div>
<div class="option">
<a id="delete-local-volume-multiplier" class="restore"><img src="../assets/trashcan-32.png" alt="Delete Local Volume Multiplier" width="16px" draggable="false"/></a>
<a id="delete-local-volume-multiplier" class="restore"><img src="../images/trashcan-32.png" alt="Delete Local Volume Multiplier" width="16px" draggable="false"/></a>
<a id="flip-local-sound-mode" class="note beam"><img alt="Flip Local Sound Mode" width="16px" draggable="false"/></a>

<input type="number" id="local-volume-multiplier-counter" min="0" step="1"/>
Expand All @@ -39,13 +39,15 @@
<label for="local-volume-multiplier-range"><label id="domain-text" class="url">Local</label> volume</label>
</div>

<div id="media-sources-message" class="option hidden">
<div id="media-sources-message" class="option message hidden">
<div>
Did the audio just get muted (or was it simply not boosted)?<br>
If yes, then you should probably enable data access permission for the following domains<br>
(or just <a id="enable-all-permissions-button" class="button">enable it for all websites</a> and you won't get prompted for it ever again):
</div>

<br>

<div id="media-sources-container">
<button id="ask-permissions-button" class="button">Ask for the selected permissions</button>

Expand All @@ -54,6 +56,18 @@
</div>
</div>

<div id="send-cookies-message" class="option message hidden">
<div>
If the video is not playing at all, you can try sending cookies in its request<br>
(for this domain only) by clicking the button below (This could be unsecure!):
</div>

<br>

<input type="checkbox" id="send-cookies-checkbox" name="send-cookies-checkbox"/>
<label for="send-cookies-checkbox">Send cookies</label>
</div>

<div id="no-media-detected-message" class="option hidden">
No media detected...
</div>
Expand Down
Loading

0 comments on commit 3444811

Please sign in to comment.