Started migration from jquery

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-23 17:53:07 +02:00
parent 6dabe2963e
commit a6e91ce590
11 changed files with 211 additions and 102 deletions

View File

@@ -215,7 +215,7 @@ var Frontpage = {
if(window.location.hostname == "fb.zoff.me") {
add = "https://zoff.me";
}
$.ajax({
Helper.ajax({
type: "POST",
data: {id:id},
url: add + "/api/imageblob",
@@ -259,10 +259,11 @@ var Frontpage = {
if(window.location.hostname == "fb.zoff.me") {
add = "https://zoff.me";
}
$.ajax({
Helper.ajax({
url: add + "/api/frontpages",
method: "get",
success: function(response){
response = JSON.parse(response);
Frontpage.frontpage_function(response.results);
},
error: function() {
@@ -327,7 +328,7 @@ var Frontpage = {
}
currently_showing_channels = 1;
clearTimeout(retry_frontpage);
$.ajax({
Helper.ajax({
url: "/" + new_channel,
method: "get",
data: {channel: new_channel},