aboutsummaryrefslogtreecommitdiff
path: root/ext/permissions.html
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-03-02 22:08:34 -0500
committerGitHub <noreply@github.com>2021-03-02 22:08:34 -0500
commitb0bc7dc08fd05fbfc45679fbad9aee82a9f2248e (patch)
tree5838c4fbb2b8d7c49726c915f1359b30daac8e31 /ext/permissions.html
parent4208595293a18c2cd95064caf77db786c2902ac8 (diff)
Add a toggle for the persistent storage option on the permissions page (#1479)
Diffstat (limited to 'ext/permissions.html')
-rw-r--r--ext/permissions.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/permissions.html b/ext/permissions.html
index 5bd6987f..699aca4f 100644
--- a/ext/permissions.html
+++ b/ext/permissions.html
@@ -153,6 +153,28 @@
<label class="toggle"><input type="checkbox" id="permission-checkbox-allow-file-url-access" disabled><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
</div>
</div></div>
+ <div class="settings-item"><div class="settings-item-inner">
+ <div class="settings-item-left">
+ <div class="settings-item-label">Persistent storage</div>
+ <div class="settings-item-description">
+ <p>
+ Web browsers will sometimes clear stored data if the device is running low on storage space,
+ which can result in the imported dictionaries being deleted unexpectedly.
+ The persistent storage permission tells the browser that the data should not be deleted in those circumstances.
+ </p>
+ <p data-show-for-browser="firefox-mobile">
+ It may not be possible to enable this permission on Firefox for Android.
+ </p>
+ <p data-show-for-browser="chrome edge">
+ Chromium-based browsers should not need to enable this setting since the Yomichan extension has
+ the <code>unlimitedStorage</code> permission, which should prevent data deletion.<sup><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=680392#c15" target="_blank" rel="noopener">[1]</a></sup>
+ </p>
+ </div>
+ </div>
+ <div class="settings-item-right">
+ <label class="toggle"><input type="checkbox" id="storage-persistent-checkbox"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>
+ </div>
+ </div></div>
</div>
<div class="footer-padding"></div>
@@ -172,6 +194,7 @@
<script src="/js/dom/document-focus-controller.js"></script>
<script src="/js/dom/html-template-collection.js"></script>
<script src="/js/pages/settings/permissions-toggle-controller.js"></script>
+<script src="/js/pages/settings/persistent-storage-controller.js"></script>
<script src="/js/pages/settings/settings-controller.js"></script>
<script src="/js/pages/permissions-main.js"></script>