Skip to content

Commit

Permalink
test message
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjara committed Jan 30, 2017
1 parent e9d24b8 commit 1af6ea7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions dummy/index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
<!DOCTYPE html>
<html>

<body>


<div id="module"></div>
<script>
document.domain = "netdb.io";

window.addEventListener('message', function(event){
// if (~event.origin.indexOf('http://yoursite.com'))
// if (~event.origin.indexOf('http://netdb.io'))
initPlugin(event.data);
});


function initPlugin(data){

data.forEach(function(item, index, array) {
document.write(item['ip']);
});
data.forEach(function(item, index, array) {

var node = document.createElement("LI");
var textLi = document.createTextNode(item["ip"]);
node.appendChild(textLi);
document.getElementById("module").appendChild(node);

});


}

</script>

</body>
</html>

0 comments on commit 1af6ea7

Please sign in to comment.