improve options&extensions menu display..again..

This commit is contained in:
RossAscends
2023-06-12 03:41:21 +09:00
parent 3aad70ee0f
commit 3dc6936002
5 changed files with 43 additions and 42 deletions

View File

@ -165,6 +165,9 @@ function onANMenuItemClick() {
}, 250);
}
//duplicate options menu close handler from script.js
//because this listener takes priority
$("#options").stop().fadeOut(250);
} else {
toastr.warning(`Select a character before trying to use Author's Note`, '', { timeOut: 2000 });
}

View File

@ -583,8 +583,9 @@ function addSDGenButtons() {
`
const dropdownHtml = `
<div id="sd_dropdown">
<span>Send me a picture of:</span>
<ul class="list-group">
<span>Send me a picture of:</span>
<li class="list-group-item" id="sd_you" data-value="you">Yourself</li>
<li class="list-group-item" id="sd_face" data-value="face">Your Face</li>
<li class="list-group-item" id="sd_me" data-value="me">Me</li>
@ -608,7 +609,7 @@ function addSDGenButtons() {
messageButton.hide();
let popper = Popper.createPopper(button.get(0), dropdown.get(0), {
placement: 'bottom',
placement: 'top',
});
$(document).on('click', '.sd_message_gen', sdMessageButton);
@ -619,10 +620,10 @@ function addSDGenButtons() {
if (target.is(button) && !dropdown.is(":visible") && $("#send_but").css('display') === 'flex') {
e.preventDefault();
dropdown.show(200);
dropdown.fadeIn(250);
popper.update();
} else {
dropdown.hide(200);
dropdown.fadeOut(250);
}
});
}