Source code

Revision control

Copy as Markdown

Other Tools

<html>
<head>
<meta charset="utf-8" />
<title>Hello, world!</title>
<meta name="viewport" content="initial-scale=1.0" />
</head>
<body style="height: 100%">
<p>Hello, world!</p>
<script>
document.body.addEventListener("click", () => {
navigator.clipboard
.readText()
.then(() => {
window.alert("allow");
})
.catch(() => {
window.alert("deny");
});
});
</script>
</body>
</html>