-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
75 lines (70 loc) · 2.09 KB
/
popup.html
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html lang="pt-BR">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'nonce-nonceValue';">
<meta name="author" content="github.com/natanr-dev">
<title>4devs Tools - by NatanR-dev</title>
<style>
body {
width: 600px;
height: 500px;
overflow: auto;
}
button {
display: contents;
}
button:hover {
cursor: pointer;
}
.github-button {
display: flex;
/* direction: rtl; */
justify-content: right;
margin-bottom: 5px;
}
</style>
<script nonce="nonceValue">
var nonce = new Uint8Array(16);
window.crypto.getRandomValues(nonce);
var nonceValue = btoa(String.fromCharCode.apply(null, nonce));
var script = document.querySelector("script[nonce]");
script.setAttribute("nonce", nonceValue);
var csp = "Content-Security-Policy: script-src 'self' 'nonce-" + nonceValue + "'";
var meta = document.querySelector("meta[http-equiv='Content-Security-Policy']");
if (meta) {
meta.setAttribute("content", csp);
} else {
meta = document.createElement("meta");
meta.setAttribute("http-equiv", "Content-Security-Policy");
meta.setAttribute("content", csp);
document.head.appendChild(meta);
}
</script>
</head>
<a>
<!-- <h1>4dev Tools</h1> -->
<div class="github-button">
<a target="_blank" href="https://github.com/natanr-dev">
<button>
<img src="assets/img/github.svg" alt="Github">
</button>
</a>
</div>
<!-- <button onclick="back()" id="backButton">Voltar</button> -->
<iframe id="site-iframe" src="https://www.4devs.com.br/" style="width:100%; height:100%;"></iframe>
<!-- <script>
function back() {
var iframe = document.getElementById('site-iframe');
iframe.contentWindow.history.back();
}
document.addEventListener("DOMContentLoaded", function () {
var backButton = document.getElementById("backButton");
backButton.addEventListener("click", function () {
console.log("Evento de click do botão detectado");
back();
});
});
</script> -->
</body>
</html>