Difference between revisions of "Widget:High-Elf-Swordsman"
From Rivendom
| Line 2: | Line 2: | ||
<script> | <script> | ||
| + | function addFrame() { | ||
var iframe = document.getElementById('monsterframe'); | var iframe = document.getElementById('monsterframe'); | ||
var innerDoc = iframe.contentDocument || iframe.contentWindow.document; | var innerDoc = iframe.contentDocument || iframe.contentWindow.document; | ||
| Line 7: | Line 8: | ||
document.body.appendChild(statblock); | document.body.appendChild(statblock); | ||
| + | } | ||
| + | |||
| + | window.onLoad = addFrame(); | ||
</script> | </script> | ||
Revision as of 17:27, 20 August 2015
<iframe id="monsterframe" src="http://monsters.themanyworlds.net/monsters/CR-1-High-Elf-Swordsman.html" style="display:none;"></iframe>
<script>
function addFrame() {
var iframe = document.getElementById('monsterframe');
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
var statblock = innerDoc.getElementsByTagName('stat-block')[0];
document.body.appendChild(statblock); }
window.onLoad = addFrame();
</script>