diff --git a/background/background.js b/background/background.js
index dc7c295f..a05c6bdd 100644
--- a/background/background.js
+++ b/background/background.js
@@ -406,6 +406,7 @@ function onRuntimeMessage(msg, sender) {
return fn.apply(context, msg.args);
}
+// FIXME: popup.js also open editor but it doesn't use this API.
function openEditor({id}) {
let url = '/edit.html';
if (id) {
diff --git a/js/prefs.js b/js/prefs.js
index cf0776ef..3e30d600 100644
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -1,3 +1,4 @@
+/* global promisify */
/* exported prefs */
'use strict';
@@ -179,23 +180,6 @@ const prefs = (() => {
},
};
- function promisify(fn) {
- return (...args) =>
- new Promise((resolve, reject) => {
- fn(...args, (...result) => {
- if (chrome.runtime.lastError) {
- reject(chrome.runtime.lastError);
- } else if (result.length === 0) {
- resolve(undefined);
- } else if (result.length === 1) {
- resolve(result[0]);
- } else {
- resolve(result);
- }
- });
- });
- }
-
function setAll(settings, synced) {
for (const [key, value] of Object.entries(settings)) {
set(key, value, synced);
diff --git a/popup.html b/popup.html
index 81070088..3becdeb1 100644
--- a/popup.html
+++ b/popup.html
@@ -151,11 +151,11 @@
+
-