mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
prefix url with http.
This commit is contained in:
parent
a91f1775fb
commit
ea51951696
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,11 @@ var getUrlParameter = function getUrlParameter(sParam) {
|
||||||
function do_success() {
|
function do_success() {
|
||||||
var url = getUrlParameter('url');
|
var url = getUrlParameter('url');
|
||||||
|
|
||||||
|
// If url does not start with http the window.location redirect
|
||||||
|
// won't work. So prefix http to url.
|
||||||
|
if (!url.startsWith('http')) {
|
||||||
|
url = 'http://'+url;
|
||||||
|
}
|
||||||
console.log('success: '+url);
|
console.log('success: '+url);
|
||||||
|
|
||||||
// Do something like refresh the window or go to another URL.
|
// Do something like refresh the window or go to another URL.
|
||||||
|
|
Loading…
Reference in a new issue