Update static/js/home.js
Browse files- static/js/home.js +12 -9
static/js/home.js
CHANGED
@@ -2,7 +2,7 @@ const getLocalUser = localStorage.getItem("username");
|
|
2 |
if (getLocalUser) {
|
3 |
document.getElementById("userProfile").innerHTML = `${getLocalUser}`;
|
4 |
} else {
|
5 |
-
document.getElementById("userProfile").innerHTML = "
|
6 |
}
|
7 |
|
8 |
function populateYearDropdown(startYear, endYear) {
|
@@ -1018,12 +1018,12 @@ else if (selectedFeature.feature === 'venues') {
|
|
1018 |
return response.json();
|
1019 |
}
|
1020 |
} ).then(data1 =>{
|
1021 |
-
|
1022 |
-
|
1023 |
-
console.log(secureUrl)
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
} )
|
1028 |
|
1029 |
} else {
|
@@ -1069,8 +1069,11 @@ else if (selectedFeature.feature === 'venues') {
|
|
1069 |
return response.json();
|
1070 |
}
|
1071 |
} ).then(data1 =>{
|
1072 |
-
|
1073 |
-
console.log(secureUrl)
|
|
|
|
|
|
|
1074 |
} )
|
1075 |
});
|
1076 |
}
|
|
|
2 |
if (getLocalUser) {
|
3 |
document.getElementById("userProfile").innerHTML = `${getLocalUser}`;
|
4 |
} else {
|
5 |
+
document.getElementById("userProfile").innerHTML = "Hei";
|
6 |
}
|
7 |
|
8 |
function populateYearDropdown(startYear, endYear) {
|
|
|
1018 |
return response.json();
|
1019 |
}
|
1020 |
} ).then(data1 =>{
|
1021 |
+
// window.open(data1.redirect, '_blank')
|
1022 |
+
let secureUrl = data1.open_url.replace(/^https?:/, window.location.protocol);
|
1023 |
+
console.log(secureUrl)
|
1024 |
+
fetch(`${secureUrl}`, {
|
1025 |
+
method: 'GET',
|
1026 |
+
});
|
1027 |
} )
|
1028 |
|
1029 |
} else {
|
|
|
1069 |
return response.json();
|
1070 |
}
|
1071 |
} ).then(data1 =>{
|
1072 |
+
let secureUrl = data1.open_url.replace(/^https?:/, window.location.protocol);
|
1073 |
+
console.log(secureUrl)
|
1074 |
+
fetch(`${secureUrl}`, {
|
1075 |
+
method: 'GET',
|
1076 |
+
});
|
1077 |
} )
|
1078 |
});
|
1079 |
}
|