don't confirm on clicking "install" for a new usercss
This commit is contained in:
parent
aedb02bbb1
commit
e7175c261a
|
@ -227,14 +227,17 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$('button.install').onclick = () => {
|
$('button.install').onclick = () => {
|
||||||
messageBox.confirm(dup ?
|
(!dup ?
|
||||||
t('styleInstallOverwrite', [data.name, dupData.version, data.version]) :
|
Promise.resolve(true) :
|
||||||
t('styleInstall', [data.name])
|
messageBox.confirm(t('styleInstallOverwrite', [
|
||||||
|
data.name,
|
||||||
|
dupData.version,
|
||||||
|
data.version,
|
||||||
|
]))
|
||||||
).then(ok => ok &&
|
).then(ok => ok &&
|
||||||
sendMessage(Object.assign(style, {method: 'saveUsercss', reason: 'update'}))
|
sendMessage(Object.assign(style, {method: 'saveUsercss', reason: 'update'}))
|
||||||
.then(install)
|
.then(install)
|
||||||
.catch(err => messageBox.alert(t('styleInstallFailed', err)))
|
.catch(err => messageBox.alert(t('styleInstallFailed', err))));
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// set updateUrl
|
// set updateUrl
|
||||||
|
|
Loading…
Reference in New Issue
Block a user