update remove index
This commit is contained in:
parent
f0fc790e60
commit
75e5dc44c3
@ -68,15 +68,17 @@ const messages = [
|
||||
];
|
||||
|
||||
let messageIndex = 0;
|
||||
let removeIndex = 0;
|
||||
|
||||
function handleNoClick() {
|
||||
const noButton = document.querySelector('.no-button');
|
||||
const yesButton = document.querySelector('.yes-button');
|
||||
noButton.textContent = messages[messageIndex];
|
||||
messageIndex = (messageIndex + 1) % messages.length;
|
||||
removeIndex++;
|
||||
const currentSize = parseFloat(window.getComputedStyle(yesButton).fontSize);
|
||||
yesButton.style.fontSize = `${currentSize * 1.5}px`;
|
||||
if(messageIndex>messages.length*2) document.querySelector('.no-button').remove()
|
||||
if(removeIndex>messages.length*2) document.querySelector('.no-button').remove()
|
||||
}
|
||||
|
||||
function handleYesClick() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user