From a1872d35214fd65e2135528c0437175bd1f9a87b Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Thu, 30 Aug 2012 01:26:14 +0200 Subject: [PATCH] support post --- js/piskel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/piskel.js b/js/piskel.js index 79521e44..50514232 100644 --- a/js/piskel.js +++ b/js/piskel.js @@ -75,7 +75,6 @@ getFrameIdFromUrl : function() { var href = window.location.href; if (href.indexOf('frameId=') != -1) { - console.log(href.substring(href.indexOf('frameId=')+8)); return href.substring(href.indexOf('frameId=')+8); } }, @@ -467,7 +466,8 @@ xhr.open('POST', PISKEL_SERVICE_URL + "/store", true); xhr.onload = function(e) { if (this.status == 200) { - alert("stored key : " + this.responseText); + var baseUrl = window.location.href.replace(window.location.search, ""); + window.location.href = baseUrl + "?frameId=" + this.responseText; } };