Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox MV3 Migration #462

Merged
merged 17 commits into from
May 22, 2024
Prev Previous commit
Next Next commit
Centering button in popup
  • Loading branch information
Mattm27 committed Mar 29, 2024
commit 1564103c787f1b022da84890d7fdad00019e015f
4 changes: 2 additions & 2 deletions src/options/views/settings-view/settings-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ <h2 class="uk-align-center text-color-darker">Welcome to OptMeowt!</h2>
<h2 class="uk-align-center text-color-darker">Welcome to OptMeowt!</h2>
</div>
<div class="uk-modal-body" style="font-size: 15px; text-align: center;">
OptMeowt requires host permissions to be enabled to work correclty. Please enable these permissions using the button below.
OptMeowt requires host permissions to be enabled to function correctly, please enable these permissions using the button below. Note that OptMeowt does not collect your data!
</div>
<div class="uk-modal-footer">
<button id="modal-button-4" class="text-color uk-button uk-button-default uk-align-center" style="margin: 0px 10px;">ENABLE</button>
<button id="modal-button-4" class="text-color uk-button uk-button-default" style="display: block; margin: 0 auto;">ENABLE</button>
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/options/views/settings-view/settings-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ async function requestPermissionsButton() {
// Check if permissions were granted or refused
if (response) {
console.log("Permissions were granted");
storage.set(stores.settings, true, "REQUEST_PERMISSIONS_SHOWN");
} else {
console.log("Permissions were refused");
}
Expand All @@ -237,6 +238,7 @@ function requestPermissions() {
modal.show();
document.getElementById("modal-button-4").onclick = () => {
requestPermissionsButton();
modal.hide();
}
}

Expand Down Expand Up @@ -282,5 +284,4 @@ export async function settingsView(scaffoldTemplate) {
if (!requestShown) {
requestPermissions();
}
storage.set(stores.settings, true, "REQUEST_PERMISSIONS_SHOWN");
}}