rollbacked: use simpler confirm instead on promise-based function
This commit is contained in:
parent
aa198d6b56
commit
da8bb40160
15
main.js
15
main.js
|
@ -426,25 +426,20 @@ function includesub()
|
|||
if (range)
|
||||
{
|
||||
var title = linkatpos();
|
||||
ask("Replace [[" + title + "]] by its content?")
|
||||
.then( (answser) =>
|
||||
if confirm("Replace [[" + title + "]] by its content?")
|
||||
{
|
||||
if (answser != "Yes") return;
|
||||
|
||||
var subnote = getnote(title);
|
||||
md.value =
|
||||
md.value.substring(0, range.start)
|
||||
+ subnote.content
|
||||
+ md.value.substring(range.end);
|
||||
|
||||
ask("Delete '" + title + "'?")
|
||||
.then( (answser) =>
|
||||
if confirm("Delete '" + title + "'?")
|
||||
{
|
||||
if (answser != "Yes") return;
|
||||
deletenote(subnote);
|
||||
})
|
||||
.finally(datachanged);
|
||||
});
|
||||
datachanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue