Created
October 1, 2019 00:29
-
-
Save luisenriquecorona/72096a48610d917a8692c3e014f4fcb3 to your computer and use it in GitHub Desktop.
Ping to server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function moveon() { | |
// Display a modal dialog to ask the user a question | |
var answer = confirm(“Ready to move on?”); | |
// If they clicked the “OK” button, make the browser load a new page | |
if (answer) window.location = “http://google.com“; | |
} | |
// Run the function defined above 1 minute (60,000 milliseconds) from now. | |
setTimeout(moveon, 60000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment