diff options
| author | Elis Eriksson <spelis.tech@gmail.com> | 2026-05-27 19:57:56 +0200 |
|---|---|---|
| committer | Elis Eriksson <spelis.tech@gmail.com> | 2026-05-27 19:57:56 +0200 |
| commit | f9200559114d9f2fa61f738b5322b0a5467538b6 (patch) | |
| tree | 3c6a6bd37250a560c67f598c2425a2031b9b307a /content/error.njk | |
| parent | ae399cf38d26715c4a09b029b849abace3c3f309 (diff) | |
| download | spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar.gz spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar.bz2 spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar.lz spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar.xz spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.tar.zst spelis-web-f9200559114d9f2fa61f738b5322b0a5467538b6.zip | |
new update or smth idk
Diffstat (limited to 'content/error.njk')
| -rw-r--r-- | content/error.njk | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/content/error.njk b/content/error.njk deleted file mode 100644 index 61c45d5..0000000 --- a/content/error.njk +++ /dev/null @@ -1,76 +0,0 @@ -<h1 id="error-code">Error</h1> -<img src="" id="error-image" style="width: 100%;"> - -<script> - const params = new URLSearchParams(window.location.search) - const code = params.get("code") || "404" - - // yes, i typed these out manually. - const messages = { - 400: "Bad request", - 401: "Unauthorized", - 402: "Payment required", - 403: "Forbidden", - 404: "Not found", - 405: "Method not allowed", - 406: "Not acceptable", - 407: "Proxy authentication required", - 408: "Request timeout", - 409: "Conflict", - 410: "Gone", - 411: "Length required", - 412: "Precondition failed", - 413: "Payload too large", - 414: "Request-URI too long", - 415: "Unsupported media type", - 416: "Request range not satisfiable", - 417: "Expectation failed", - 418: "I'm a teapot", - 419: "Page expired", - 420: "Enhance your calm", - 421: "Misdirected request", - 422: "Unprocessable entity", - 423: "Locked", - 424: "Failed dependency", - 425: "Too early", - 426: "Upgrade required", - 428: "Precondition Required", - 429: "Too many requests", - 431: "Request header fields too large", - 444: "No response", - 450: "Blocked by windows parental controls", - 451: "Unavailable for legal reasons", - 495: "SSL certificate error", - 496: "SSL certificate required", - 497: "HTTP request sent to HTTPS port", - 498: "Token expired/invalid", - 499: "Client closed request", - - - 500: "Internal server error", - 501: "Not implemented", - 502: "Bad gateway", - 503: "Service unavailable", - 504: "Gateway timeout", - 506: "Variant also negotiates", - 507: "Insufficient storage", - 508: "Loop detected", - 509: "Bandwidth limit exceeded", - 510: "Not extended", - 511: "Network authentication required", - 521: "Web server is down", - 522: "Connection timed out", - 523: "Origin is unreachable", - 525: "SSL handshake failed", - 530: "Site frozen", - 599: "Network connect timeout error" - } - - document.getElementById("error-code").textContent = "Error " + code + " - " + (messages[code] || "Unexpected error") - const host = Math.random() < 0.5 ? "cat" : "dog"; - const url = host === "dog" - ? `https://http.dog/${code}.jpg` - : `https://http.cat/${code}`; - - document.getElementById("error-image").src = url; -</script> |
