Skip to content

Instantly share code, notes, and snippets.

@TerhoAntila
Created November 21, 2020 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TerhoAntila/a0082e86a7f34120e853bdc096b47b7c to your computer and use it in GitHub Desktop.
Save TerhoAntila/a0082e86a7f34120e853bdc096b47b7c to your computer and use it in GitHub Desktop.
<html>
<script>
var url = new URL(window.location.href);
var data = url.searchParams.get("data");
var params = {};
data.split('&').forEach(element => {
params[element.split('=')[0]] = element.split('=')[1];
});
function doEmbedding(){
var elmWrapper = document.getElementById("contents");
var div = document.createElement("div");
div.innerText = params.testparam + " " + params.testparam2;
elmWrapper.appendChild(div);
}
</script>
<body>
<h1>This is test page</h1>
<div id="contents"></div>
</body>
<script>
doEmbedding();
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment