function saveOptions(e) {
  browser.storage.local.set({
    colour: document.querySelector("#colour").value
  });
}

function restoreOptions() {
  var gettingItem = browser.storage.local.get('colour');
  gettingItem.then((res) => {
    document.querySelector("#colour").value = res.colour || 'Firefox red';
  });
}

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

@@ -107,16 +107,38 @@
 e%0A  %7D);%0A
+  e.preventDefault();%0A
 %7D%0A%0Afunct

add in prevent default (#173)