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 = () => {
|
||||
messageBox.confirm(dup ?
|
||||
t('styleInstallOverwrite', [data.name, dupData.version, data.version]) :
|
||||
t('styleInstall', [data.name])
|
||||
(!dup ?
|
||||
Promise.resolve(true) :
|
||||
messageBox.confirm(t('styleInstallOverwrite', [
|
||||
data.name,
|
||||
dupData.version,
|
||||
data.version,
|
||||
]))
|
||||
).then(ok => ok &&
|
||||
sendMessage(Object.assign(style, {method: 'saveUsercss', reason: 'update'}))
|
||||
.then(install)
|
||||
.catch(err => messageBox.alert(t('styleInstallFailed', err)))
|
||||
);
|
||||
.catch(err => messageBox.alert(t('styleInstallFailed', err))));
|
||||
};
|
||||
|
||||
// set updateUrl
|
||||
|
|
Loading…
Reference in New Issue
Block a user