76 lines
1.5 KiB
HTML
76 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style type="text/css">
|
|
html, body {
|
|
width: 100%; height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
body {
|
|
font-size: 31px;
|
|
font-family: sans-serif;
|
|
color: black;
|
|
text-align: center;
|
|
cursor: default;
|
|
user-select: none;
|
|
}
|
|
|
|
button {
|
|
font-size: inherit;
|
|
margin: 2px auto;
|
|
cursor: pointer;
|
|
width: 137px;
|
|
}
|
|
|
|
:root {
|
|
--goButtonWidth: 100px;
|
|
}
|
|
|
|
#url {
|
|
width: calc(100% - 50px - var(--goButtonWidth));
|
|
font-size: 30px;
|
|
margin: 10px 3px 0 -5px;
|
|
}
|
|
|
|
#goButton {
|
|
width: var(--goButtonWidth);
|
|
height: 50px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="controlPanel">
|
|
<button onclick="demoNavBack()">Back</button>
|
|
<button onclick="demoNavForward()">Forward</button>
|
|
<button onclick="demoNavRefresh()">Refresh</button>
|
|
<button onclick="demoNavClose()">Close</button>
|
|
|
|
<br>
|
|
|
|
<form id="urlForm">
|
|
<input type="text" id="url" placeholder="Page URL"><button id="goButton" type="submit">Go</button>
|
|
</form>
|
|
<br>
|
|
|
|
<script type="application/javascript">
|
|
function goTo(url) { console.log("Go to: " + url); }
|
|
function getURL() {
|
|
return document.getElementById("url").value;
|
|
}
|
|
|
|
document.getElementById("urlForm").addEventListener("submit", ev => {
|
|
ev.preventDefault();
|
|
goTo(getURL());
|
|
});
|
|
|
|
document.getElementById("url").addEventListener("focus", ev => {
|
|
ev.target.select();
|
|
});
|
|
|
|
function setURL(url) {
|
|
document.getElementById("url").value = url;
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |