Fixed urls

This commit is contained in:
Kasper Rynning-Tønnesen
2017-10-16 22:05:48 +02:00
parent 296327ba7d
commit 3d0ed3aeb5
3 changed files with 12 additions and 4 deletions

View File

@@ -194,10 +194,14 @@ var Frontpage = {
img.src = "/assets/images/thumbnails/"+id+".jpg";
img.onerror = function(e){ // Failed to load
var add = "";
if(window.location.hostname == "fb.zoff.me") {
add = "https://zoff.me";
}
$.ajax({
type: "POST",
data: {id:id},
url: "/api/imageblob",
url: add + "/api/imageblob",
success: function(data){
setTimeout(function(){
$("#mega-background").css("background", "url(/assets/images/thumbnails/"+data+")");
@@ -229,8 +233,12 @@ var Frontpage = {
},
get_frontpage_lists: function() {
var add = "";
if(window.location.hostname == "fb.zoff.me") {
add = "https://zoff.me";
}
$.ajax({
url: "/api/frontpages",
url: add + "/api/frontpages",
method: "get",
success: function(response){
Frontpage.frontpage_function(response);