Rewild Your Web
web
browser
dweb
1<html>
2<head>
3<title>Certificate error</title>
4</head>
5<body>
6 <p>${reason}</p>
7 <button id="leave" onclick="history.back()">Go back (recommended)</button>
8 <button id="allow">Allow certificate temporarily</button>
9 <div style="word-break: break-all; font-family: monospace" id="bytes">${bytes}</div>
10 <script>
11 let bytes = document.getElementById('bytes').textContent;
12 let button = document.getElementById('allow');
13 let exitButton = document.getElementById('leave');
14 if (bytes.length) {
15 button.onclick = function() {
16 let xhr = new XMLHttpRequest();
17 xhr.open('POST', 'chrome:allowcert');
18 xhr.onloadend = function() {
19 location.reload(true);
20 };
21 xhr.send("${secret}&${bytes}");
22 };
23 } else {
24 button.style.display = "none";
25 }
26 </script>
27</body>
28</html>