2020-07-08 19:26:46 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>datatrash</title>
|
2020-07-09 17:27:24 +00:00
|
|
|
<meta charset="utf-8" />
|
2020-07-13 13:59:16 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
2020-07-08 19:26:46 +00:00
|
|
|
<link href="/static/index.css" rel="stylesheet" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<main>
|
2020-07-09 17:27:24 +00:00
|
|
|
<h1><a href="/">datatrash</a></h1>
|
2020-07-14 11:21:57 +00:00
|
|
|
<textarea id="text" rows="20" cols="120" readonly>{text}</textarea>
|
|
|
|
<br />
|
|
|
|
<a class="main button" href="?raw">Herunterladen</a>
|
|
|
|
<button id="copy" class="button" onclick="copyToClipboard()">
|
|
|
|
Text kopieren
|
|
|
|
</button>
|
2020-07-08 19:26:46 +00:00
|
|
|
</main>
|
2020-07-14 11:21:57 +00:00
|
|
|
<script lang="javascript">
|
|
|
|
function copyToClipboard() {
|
|
|
|
const button = document.getElementById("copy");
|
|
|
|
if (!navigator.clipboard) {
|
|
|
|
button.innerText = "Nicht unterstützt";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
const textarea = document.getElementById("text");
|
|
|
|
navigator.clipboard.writeText(textarea.value).then(
|
|
|
|
_ => { button.innerText = "Kopiert!"; },
|
|
|
|
_ => { button.innerText = "Nicht unterstützt"; },
|
|
|
|
);
|
|
|
|
}
|
|
|
|
</script>
|
2020-07-08 19:26:46 +00:00
|
|
|
</body>
|
|
|
|
</html>
|