From e8d0c7d0397b20e50648fae228a6285e7f1a3f96 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 21 Nov 2017 13:33:11 +0300 Subject: [PATCH] update button on USO page now confirms only on the first click --- content/install.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/install.js b/content/install.js index a8b2073a..f3e0a300 100644 --- a/content/install.js +++ b/content/install.js @@ -223,10 +223,12 @@ function onUpdate() { function saveStyleCode(message, name, addProps) { return new Promise((resolve, reject) => { - if (!confirm(chrome.i18n.getMessage(message, [name]))) { + const needsConfirmation = message === 'styleInstall' || !saveStyleCode.confirmed; + if (needsConfirmation && !confirm(chrome.i18n.getMessage(message, [name]))) { reject(); return; } + saveStyleCode.confirmed = true; enableUpdateButton(false); getStyleJson().then(json => { if (!json) {