summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/lib/etc/push.js9
-rwxr-xr-xStoneIsland/www/js/sdk/_sdk.js4
2 files changed, 10 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
index 3b919ffd..1606199f 100755
--- a/StoneIsland/www/js/lib/etc/push.js
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -70,7 +70,7 @@ var push = (function(){
})
$.ajax({
method: "POST",
- url: "https://stone.giraffe.life/_services/push/add",
+ url: push.url('add'),
data: data,
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function(){
@@ -91,7 +91,7 @@ var push = (function(){
}
$.ajax({
method: "POST",
- url: "https://stone.giraffe.life/_services/push/remove",
+ url: push.url('remove'),
data: data,
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function(){
@@ -101,8 +101,11 @@ var push = (function(){
error: push.error,
})
}
+ push.url = function(key){
+ return sdk.cms() + '/_services/push/' + key
+ }
push.got_push_notification = function(push_obj) {
- // alert('We received this push notification: ' + JSON.stringify(push_obj));
+ console.log('We received this push notification: ' + JSON.stringify(push_obj));
app.blog.refresh()
try {
diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js
index 705ca002..fbb35785 100755
--- a/StoneIsland/www/js/sdk/_sdk.js
+++ b/StoneIsland/www/js/sdk/_sdk.js
@@ -29,6 +29,10 @@ var sdk = (function(){
return "https://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_" + size + ".jpg"
}
+ sdk.cms = function(){
+ return "https://stone.giraffe.life"
+ }
+
$.ajaxSetup({
// possibly: application/json; charset=utf-8"
contentType: "application/json",