Tried to fix the background loading issue

This commit is contained in:
Yord 2015-05-02 14:07:46 +02:00
parent d70129e0df
commit 69837fca81

View file

@ -80,16 +80,18 @@
}); });
} }
db.get("bg", function(error, bg) { $(function() {
if(error) { db.get("bg", function(error, bg) {
bg = { if(error) {
_id: "bg", bg = {
name: "/static/images/bg-FMF.jpg", _id: "bg",
topX: -370 name: "/static/images/bg-FMF.jpg",
}; topX: -370
db.put(bg); };
} db.put(bg);
changeBackground(bg.name, bg.topX); }
changeBackground(bg.name, bg.topX);
});
}); });
</script> </script>
</body> </body>