about summary refs log tree commit diff stats
path: root/src/pages/options/medium.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/options/medium.js')
-rw-r--r--src/pages/options/medium.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pages/options/medium.js b/src/pages/options/medium.js
index 6fbc390d..bd86089f 100644
--- a/src/pages/options/medium.js
+++ b/src/pages/options/medium.js
@@ -50,4 +50,12 @@ scribeRandomPoolElement.addEventListener("input", commonHelper.debounce(() => {
     scribeRandomPool = commonHelper.filterList(scribeRandomPoolElement.value.split("\n"))
     commonHelper.updateListElement(scribeRandomPoolListElement, scribeRandomPool);
     browser.storage.sync.set({ scribeRandomPool: scribeRandomPool });
-}, 50));
\ No newline at end of file
+}, 50));
+
+browser.storage.onChanged.addListener((changes) => {
+    if ("scribeRandomPool" in changes) {
+        scribeRandomPool = changes.scribeRandomPool.newValue;
+        scribeRandomPoolElement.value = scribeRandomPool.join("\n");
+        commonHelper.updateListElement(scribeRandomPoolListElement, scribeRandomPool);
+    }
+})
\ No newline at end of file