Created
February 5, 2014 21:44
-
-
Save zoharbabin/8833820 to your computer and use it in GitHub Desktop.
JavaScript Close Event for Player iframe Plugin: http://player.kaltura.com/docs/LimeSurvey (this should be called from within the LimeSurvey's close message window)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function getUrlParams() { | |
var params = { }; | |
document.referrer.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) { | |
params[key] = value; | |
}); | |
return params; | |
} | |
var params = getUrlParams(); | |
parent.postMessage(JSON.stringify( { 'status':'ok', 'playerId': params.playerId} ), '*' ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment