/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/default-resources/resources/badcert.html
28 строк
876 B
Jonathan Schwender
Embed default resources in Servo applications using a `servo-default-resources` crate (#43182)
01 апр 2026, 10:16
Не верифицирован
01 апр 2026, 10:16
f4877c1
Код
Авторство
О чём код?
<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> <div style="word-break: break-all; font-family: monospace" id="bytes">${bytes}</div> <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}&${bytes}"); }; } else { button.style.display = "none"; } </script> </body> </html>