Add simple button to try again for now
This commit is contained in:
parent
48641bdef1
commit
c020aacdce
1 changed files with 11 additions and 1 deletions
12
script.js
12
script.js
|
@ -48,13 +48,23 @@ function createCheckButton(destination) {
|
||||||
check(destination, container, dot, message, button);
|
check(destination, container, dot, message, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createTryAgainButton(destination) {
|
||||||
|
const button = document.createElement('button');
|
||||||
|
button.textContent = 'Try Again';
|
||||||
|
button.onclick = function () {
|
||||||
|
window.location.href = destination;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('checkContainer').appendChild(button);
|
||||||
|
}
|
||||||
|
|
||||||
function checkDestination() {
|
function checkDestination() {
|
||||||
const url = window.location.search;
|
const url = window.location.search;
|
||||||
const searchParams = new URLSearchParams(url);
|
const searchParams = new URLSearchParams(url);
|
||||||
const destination = searchParams.get('destination');
|
const destination = searchParams.get('destination');
|
||||||
|
|
||||||
if (destination) {
|
if (destination) {
|
||||||
createCheckButton(destination);
|
createTryAgainButton(destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue