Updating channel to fetch prettier

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-12 19:17:01 +01:00
parent 1d7331cb86
commit 3f0f8eb5d9
14 changed files with 196 additions and 57 deletions

View File

@@ -243,36 +243,11 @@ var Channel = {
if(!client) {
setup_chat_listener();
get_history();
//console.log(Crypt.get_userpass(chan.toLowerCase()));
} else {
var c = Crypt.get_userpass(chan.toLowerCase());
if(c == "" || c == undefined) {
c = "";
}
$.ajax({
type: "POST",
data: {
userpass: c,
},
url: "/api/list/" + chan.toLowerCase(),
success: function(response) {
if(response.results.length > 0) {
$("#channel-load").remove();
if(response.status == 403) {
start_auth();
}
$("#channel-load").remove();
List.populate_list(response.results);
}
},
error: function(response) {
if(response.responseJSON.status == 403) {
start_auth();
}
$("#channel-load").remove();
//List.populate_list(response.responseJSON.results);
}
});
}
if(client || Helper.mobilecheck()){
get_list_ajax();
get_np_ajax();
}
if(!Helper.msieversion() && !Helper.mobilecheck() && !client) Notification.requestPermission();