-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.html
More file actions
36 lines (36 loc) · 1.17 KB
/
test.html
File metadata and controls
36 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<title>HTML testing page</title>
<script>
async function renderClipboard() {
try {
const text = await navigator.clipboard.readText();
document.open();
document.write(text);
document.close();
const script = document.createElement('script');
script.src = 'https://pooiod7.neocities.org/projects/scripthub/scripts/eruda.js';
document.body.appendChild(script);
} catch (error) {
const textarea = document.createElement('textarea');
textarea.placeholder = 'Paste your HTML here';
textarea.style.width = '100%';
textarea.style.height = '100vh';
document.body.appendChild(textarea);
textarea.focus();
textarea.addEventListener('input', () => {
document.open();
document.write(textarea.value);
document.close();
const script = document.createElement('script');
script.src = 'https://pooiod7.neocities.org/projects/scripthub/scripts/eruda.js';
document.body.appendChild(script);
});
}
}
window.onload = renderClipboard;
</script>
</head>
<body></body>
</html>