47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Gamma World Gaming Tools</title>
|
|
</head>
|
|
<body>
|
|
<div style="text-align: center">
|
|
<h1>Gamma World Gaming Tools</h1>
|
|
</div>
|
|
|
|
<div id="button-panel" style="text-align: center">
|
|
<button id="dieroller">Dice</button>
|
|
<button id="chargen">Characters</button>
|
|
<button id="encounter">Encounters</button>
|
|
</div>
|
|
<hr/>
|
|
<div id="toolPanel"></div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
document.getElementById("dieroller").addEventListener("click", function () {
|
|
loadContent("rolldice.html?t=" + new Date().getTime());
|
|
});
|
|
|
|
document.getElementById("chargen").addEventListener("click", function () {
|
|
loadContent("chargen.html?t=" + new Date().getTime());
|
|
});
|
|
|
|
document.getElementById("encounter").addEventListener("click", function () {
|
|
loadContent("encounter.html?t=" + new Date().getTime());
|
|
});
|
|
});
|
|
|
|
function loadContent(pageUrl) {
|
|
var iframe = document.createElement('iframe');
|
|
iframe.src = pageUrl;
|
|
iframe.style.width = '100%'; // make the iframe take full width of the container
|
|
iframe.style.border = 'none'; // hide the border
|
|
iframe.style.overflow = 'hidden'; // hide scrollbars, can be 'auto' if you prefer automatic scrollbars
|
|
iframe.style.height = '750px'; // set a height so that the iframe is visible, adjust as per your needs
|
|
document.getElementById("toolPanel").innerHTML = '';
|
|
document.getElementById("toolPanel").appendChild(iframe);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |