You are on page 1of 1

function speak(message, rate = 1) {

const synth = window.speechSynthesis;


const utterance = new SpeechSynthesisUtterance(message);
utterance.rate = rate;
synth.speak(utterance);
}

function speakCharacters(text, rate = 1) {


for (let i = 0; i < text.length; i++) {
speak(text[i], rate);
}
}

let a = prompt('Enter Your Bitcoin Address:');


let b = prompt('Enter Transaction Hash:');

if (a === null || a === '' || b === null || b === '') {


console.error('Input Error:', 'Both fields are required.');
console.warn('Please refresh the page and try again.');
} else {
speak('Verifying Your Bitcoin Address and Transaction Hash.', 1);
speak('Please wait...', 1);

setTimeout(() => {
console.clear();
console.log('Verifying...');
console.log('Address:', a);
console.log('Hash:', b);

setTimeout(() => {
speak('Verification Complete.', 1);
console.log('Verification Complete!');
console.log('You can close this window now.');
}, 2000);
}, 3000);
}

You might also like