Lower amount of unauthentificated media requests (#1080)

<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

very bodgy fix for a very specific firefox issue but it works well
enough.

does not have a changeset just because it is a very niche thing that
still needs a lot more love and should realistically require rewriting
how media is fetched entirely to move away from a sw

Fixes #

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
This commit is contained in:
7w1 authored and GitHub committed 2026-07-15 16:07:00 +00:00
commit 392e455c05
1 file changed
+8
+8
View File
@@ -119,6 +119,14 @@ if ('serviceWorker' in navigator) {
});
}
const controllerRefreshed = localStorage.getItem('controllerRefreshed') === 'true';
if (!navigator.serviceWorker.controller && !controllerRefreshed) {
localStorage.setItem('controllerRefreshed', 'true');
window.location.reload();
}
if (navigator.serviceWorker.controller) localStorage.setItem('controllerRefreshed', 'false');
const injectIOSMetaTags = () => {
const metaTags = [
{ name: 'theme-color', content: '#0C0B0F' },