fix: respect prefers reduced motion by default

This commit is contained in:
sethburkart123
2024-08-21 21:10:52 +10:00
parent e19020066a
commit 4d38af402f
+5
View File
@@ -283,6 +283,11 @@ async function UpdateCurrentValues() {
browser.runtime.onInstalled.addListener(function (event) {
browser.storage.local.remove(['justupdated']);
browser.storage.local.remove(['data']);
if (event.reason == 'install' && window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
browser.storage.local.set({ animations: false });
}
UpdateCurrentValues();
if ( event.reason == 'install', event.reason == 'update' ) {
browser.storage.local.set({ justupdated: true });