mirror of
https://github.com/servo/servo.git
synced 2025-06-17 12:54:28 +00:00
28 lines
828 B
HTML
28 lines
828 B
HTML
<html>
|
|
<head>
|
|
<title>Certificate error</title>
|
|
</head>
|
|
<body>
|
|
<p>${reason}</p>
|
|
<button id="leave" onclick="history.back()">Go back (recommended)</button>
|
|
<button id="allow">Allow certificate temporarily</button>
|
|
<pre id="bytes">${bytes}</pre>
|
|
<script>
|
|
let bytes = document.getElementById('bytes').textContent;
|
|
let button = document.getElementById('allow');
|
|
let exitButton = document.getElementById('leave');
|
|
if (bytes.length) {
|
|
button.onclick = function() {
|
|
let xhr = new XMLHttpRequest();
|
|
xhr.open('POST', 'chrome:allowcert');
|
|
xhr.onloadend = function() {
|
|
location.reload(true);
|
|
};
|
|
xhr.send("${secret}&" + btoa(bytes));
|
|
};
|
|
} else {
|
|
button.style.display = "none";
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|