function restoreOptions() {
    browser.storage.local.get([
        "linkedImagesRegexp",
        "minWidth",
        "minHeight",
    ], result => {
        document.querySelector("#linkedImagesRegexp").value = result.linkedImagesRegexp || "";
        document.querySelector("#minWidth").value = result.minWidth || "";
        document.querySelector("#minHeight").value = result.minHeight || "";
    });
}

function saveOptions(event) {
    event.preventDefault();
    browser.storage.local.set({
        linkedImagesRegexp: document.querySelector("#linkedImagesRegexp").value,
        minWidth: document.querySelector("#minWidth").value,
        minHeight: document.querySelector("#minHeight").value,
    });
}

document.addEventListener("DOMContentLoaded", restoreOptions);
document.querySelector("form").addEventListener("submit", saveOptions);

browser.storage.onChanged.addListener(restoreOptions);

@@ -129,17 +129,31 @@
 %22,%0A    %5D
-,
+).then(%0A       
  result 
@@ -157,32 +157,36 @@
 lt =%3E %7B%0A        
+   
+ 
 document.querySe
@@ -256,32 +256,36 @@
  %7C%7C %22%22;%0A        
+    
 document.querySe
@@ -327,32 +327,36 @@
 minWidth %7C%7C %22%22;%0A
+    
         document
@@ -416,25 +416,34 @@
  %7C%7C %22%22;%0A    
-%7D
+    %7D%0A    
 );%0A%7D%0A%0Afuncti

Use promise in options.js for compatibility