Hello,
Currently I am using YOURLS PHP URL shorterning script.
In their functions.php, seems like they support both redirection which is with PHP header location and javascript.
I want to redirect with javascript, which will show me the message before redirect. I found this coding inside functions.php
// Redirect to another page using Javascript. Set optional (bool)$dontwait to false to force manual redirection (make sure a message has been read by user)
function yourls_redirect_javascript( $location, $dontwait = true ) {
if( $dontwait ) {
echo <<<REDIR
<script type="text/javascript">
window.location="$location";
</script>
<small>(if you are not redirected after 10 seconds, please <a href="$location">click here</a>)</small>
REDIR;
} else {
echo <<<MANUAL
<p>Please <a href="$location">click here</a></p>
MANUAL;
}
}
But I don't know how to do it. Is that coding currently commented or ? What should i change to redirect with javascript ?
Please help me out. Thanks.