From baab837be4ba3282b73456c9782699c9c8b64fc8 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 10 Dec 2017 10:56:09 +0300 Subject: [PATCH] adjust style properties on installing * reason = 'install' * updateUrl += '?' when configurable --- popup/search-results.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/popup/search-results.js b/popup/search-results.js index 13b19d53..ab05596b 100755 --- a/popup/search-results.js +++ b/popup/search-results.js @@ -406,6 +406,11 @@ window.addEventListener('showStyles:done', function _() { // Fetch .JSON style searchAPI.fetchStyleJson(result) .then(userstyleJson => { + userstyleJson.reason = 'install'; + if (result.style_settings.length) { + // this will make the popup show a config-on-homepage icon + userstyleJson.updateUrl += '?'; + } // Install style saveStyleSafe(userstyleJson) .then(savedStyle => {