Skip to content

Commit

Permalink
v1.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zWolfrost committed Jan 6, 2024
1 parent 9de722f commit 7874097
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,7 @@ _Note that any version might include a number of stylistic changes, which are of
- **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.
<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.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Better Volume Booster",
"version": "1.10.0",
"version": "1.10.1",

"description": "Volume booster firefox extension that remembers your choices.",

Expand Down
12 changes: 4 additions & 8 deletions scripts/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ function addPermissionToMediaSourcesList(domain)
function updatePopup()
{
const RANGE_TOTAL_STEPS = 100;
const MEDIA_SOURCES_REFRESH_MS = 500;

browser.storage.local.get().then(storage =>
{
Expand Down Expand Up @@ -178,10 +177,7 @@ function addPermissionToMediaSourcesList(domain)

if (storage.options.disablePermissionPrompt == false)
{
let updateMediaSourceDomainsFunction = () => updateMediaSourceDomains({ includePermissionSubdomains: storage.options.includePermissionSubdomains })

updateMediaSourceDomainsFunction()
setInterval(updateMediaSourceDomainsFunction, MEDIA_SOURCES_REFRESH_MS);
updateMediaSourceDomains({ includePermissionSubdomains: storage.options.includePermissionSubdomains })
}
}
else
Expand All @@ -202,8 +198,8 @@ function addPermissionToMediaSourcesList(domain)
{
try
{
let hostname = new URL(el.currentSrc ?? el.src).origin.split("/").at(-1);
sourceDomains.push(hostname);
let hostname = new URL(el.currentSrc ?? el.src).hostname;
if (hostname) sourceDomains.push(hostname);
}
catch{}
}
Expand All @@ -216,7 +212,7 @@ function addPermissionToMediaSourcesList(domain)
const mediaSourcesResult = await browser.scripting.executeScript({ target: {tabId: tab.id, allFrames: true}, /* injectImmediately: true, */ func: getMediaSourcesDomains });
const mediaSourcesCleaned = mediaSourcesResult.map(res => res.result).flat().filter(el => el);

//log(mediaSourcesResult)
log(mediaSourcesResult)

if (mediaSourcesCleaned.length > 0)
{
Expand Down

0 comments on commit 7874097

Please sign in to comment.