adjust style properties on installing

* reason = 'install'
* updateUrl += '?' when configurable
This commit is contained in:
tophf 2017-12-10 10:56:09 +03:00
parent f120ae9753
commit baab837be4

View File

@ -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 => {