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 // Fetch .JSON style
searchAPI.fetchStyleJson(result) searchAPI.fetchStyleJson(result)
.then(userstyleJson => { .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 // Install style
saveStyleSafe(userstyleJson) saveStyleSafe(userstyleJson)
.then(savedStyle => { .then(savedStyle => {