Fix coffee error (#1485)

This commit is contained in:
Xavier Guimard 2018-07-28 07:28:30 +02:00
parent aef0bbc22b
commit 7d67e6225d
3 changed files with 15 additions and 18 deletions

View File

@ -11,17 +11,14 @@ $(document).ready ->
console.log 'Parsing error', e
# Initialize JS communication channel
window.addEventListener "message", (e) ->
message = e.data
client_id = decodeURIComponent message.split(' ')[0]
session_state = decodeURIComponent message.split(' ')[1]
salt = decodeURIComponent session_state.split('.')[1]
ss = hash.toString(CryptoJS.enc.Base64) + '.' + salt
if session_state == ss
stat = 'unchanged'
else
stat = 'changed'
e.source.postMessage stat, e.origin
, false
message = e.data
client_id = decodeURIComponent message.split(' ')[0]
session_state = decodeURIComponent message.split(' ')[1]
salt = decodeURIComponent session_state.split('.')[1]
ss = hash.toString(CryptoJS.enc.Base64) + '.' + salt
if session_state == ss
stat = 'unchanged'
else
stat = 'changed'
e.source.postMessage stat, e.origin
, false

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.7
// Generated by CoffeeScript 1.12.8
(function() {
var values;
@ -31,8 +31,8 @@
} else {
stat = 'changed';
}
return e.source.postMessage(stat, e.origin, false);
});
return e.source.postMessage(stat, e.origin);
}, false);
});
}).call(this);

View File

@ -1 +1 @@
(function(){var values;values={};$(document).ready(function(){$("script[type='application/init']").each(function(){var e,k,results,tmp;try{tmp=JSON.parse($(this).text());results=[];for(k in tmp){results.push(values[k]=tmp[k])}return results}catch(error){e=error;return console.log("Parsing error",e)}});return window.addEventListener("message",function(e){var client_id,message,salt,session_state,ss,stat;message=e.data;client_id=decodeURIComponent(message.split(" ")[0]);session_state=decodeURIComponent(message.split(" ")[1]);salt=decodeURIComponent(session_state.split(".")[1]);ss=hash.toString(CryptoJS.enc.Base64)+"."+salt;if(session_state===ss){stat="unchanged"}else{stat="changed"}return e.source.postMessage(stat,e.origin,false)})})}).call(this);
(function(){var values;values={};$(document).ready(function(){$("script[type='application/init']").each(function(){var e,k,results,tmp;try{tmp=JSON.parse($(this).text());results=[];for(k in tmp){results.push(values[k]=tmp[k])}return results}catch(error){e=error;return console.log("Parsing error",e)}});return window.addEventListener("message",function(e){var client_id,message,salt,session_state,ss,stat;message=e.data;client_id=decodeURIComponent(message.split(" ")[0]);session_state=decodeURIComponent(message.split(" ")[1]);salt=decodeURIComponent(session_state.split(".")[1]);ss=hash.toString(CryptoJS.enc.Base64)+"."+salt;if(session_state===ss){stat="unchanged"}else{stat="changed"}return e.source.postMessage(stat,e.origin)},false)})}).call(this);