remove unused functions
This commit is contained in:
+1
-24
@@ -35,29 +35,6 @@ function uploadFile() {
|
||||
document.getElementById("avatarUplButton").style = "display:none;";
|
||||
}
|
||||
|
||||
function getCookie(cname) {
|
||||
let name = cname + "=";
|
||||
let decodedCookie = decodeURIComponent(document.cookie);
|
||||
let ca = decodedCookie.split(';');
|
||||
for(let i = 0; i <ca.length; i++) {
|
||||
let c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function setCookie(cname, cvalue, exdays) {
|
||||
const d = new Date();
|
||||
d.setTime(d.getTime() + (exdays*24*60*60*1000));
|
||||
let expires = "expires="+ d.toUTCString();
|
||||
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
|
||||
}
|
||||
|
||||
function logout() {
|
||||
location.assign('/logout')
|
||||
}
|
||||
@@ -92,7 +69,7 @@ async function setuser() {
|
||||
* @param {string} str - bio to set
|
||||
* @return {promise} api response
|
||||
*/
|
||||
async function sendBio(str) {
|
||||
function sendBio(str) {
|
||||
if(document.getElementById("bio").placeholder !== str && str !== "") {
|
||||
document.getElementById("bio").placeholder = str
|
||||
return post("/api/setBio",{"Bio":str}) // skipqc
|
||||
|
||||
Reference in New Issue
Block a user