Skip to content

Instantly share code, notes, and snippets.

@gasgas83
Last active January 31, 2018 18:52
Show Gist options
  • Save gasgas83/ae7e9a66df6c33303d94 to your computer and use it in GitHub Desktop.
Save gasgas83/ae7e9a66df6c33303d94 to your computer and use it in GitHub Desktop.
Pym para Apps
<!-- PYM -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pym/1.2.0/pym.v1.min.js" ></script>
<script>
var parentPageUrl = document.URL,
pymChild = new pym.Child();
pymChild.sendMessage('pymEspecialesLoaded', 'ready');
pymChild.onMessage('setShareUrl', function(Url) {
var a = document.createElement('a');
a.href = Url;
console.error(a.href, Url);
parentPageUrl = Url;
//console.log(parentPageUrl)
});
</script>
<!-- PYM -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment