-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwriteup.html
More file actions
58 lines (50 loc) · 1.33 KB
/
Copy pathwriteup.html
File metadata and controls
58 lines (50 loc) · 1.33 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=yes">
<head>
<meta charset="UTF-8">
<title>Writeup Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body, html {
margin: 0;
padding: 0;
font-family: sans-serif;
background: black;
color: #444;
}
.error {
text-align: center;
padding: 2rem;
}
</style>
</head>
<body>
<script>
function getQueryParam(name) {
const params = new URLSearchParams(window.location.search);
return params.get(name);
}
const container = document.body;
const url = getQueryParam('url');
if (url && /^https?:\/\//i.test(url)) {
const iframe = document.createElement('iframe');
iframe.src = decodeURIComponent(url);
iframe.allowFullscreen = true;
iframe.width = "100%"
iframe.height = "1080" ;
iframe.frameBorder = 0 ;
container.innerHTML = '';
container.appendChild(iframe);
} else {
container.innerHTML = `
<div class="error">
<h2>Invalid or Missing URL</h2>
<p>Please provide a valid URL using <code>?url=https://example.com</code></p>
</div>
`;
}
</script>
</body>
</html>