Skip to content

Commit c7e3513

Browse files
Major update to 404 error page.
1 parent accf2dd commit c7e3513

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

404NotFound/404.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<script src="/404NotFound/404JS/404_not_found.js"></script>
1010
</head>
1111
<body>
12-
<h1 class="error">404 Not Found Error</h1>
12+
<h1 id="ErrorTitle" class="error">404 Not Found Error</h1>
1313
<br>
14-
<p class="error">The page you are looking for was not found or the page does not exist 404 Not found Error.</p>
14+
<p id="ErrorDescription" class="error">The page you are looking for was not found or the page does not exist 404 Not found Error.</p>
1515
<br>
16-
<p><a class="home" href="https://linuxuserslinuxmint.github.io">LinuxUsersLinuxMint - Main Page</a></p>
17-
<p><a href="/support/index_en.html" class="home">LinuxUsersLinuxMint - Support Page</a></p>
16+
<p><a id="MainPage" class="home" href="https://linuxuserslinuxmint.github.io">LinuxUsersLinuxMint - Main Page</a></p>
17+
<p><a id="SupportPage" href="/support/index_en.html" class="home">LinuxUsersLinuxMint - Support Page</a></p>
1818
</body>
1919
</html>

404NotFound/404JS/404_not_found.js

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
var lang = navigator.language;
2-
if (lang.startsWith("tr"))
3-
{
4-
console.error("LinuxUsersLinuxMint: 404 bulunamadı hatası. Üzgünüm! bu web sitesinde aramaya çalıştığınız sayfa veya içerik taşınmış veya silinmiş olabilir...");
5-
alert("404 bulunamadı hatası");
6-
}
7-
else if (lang.startsWith("en"))
8-
{
9-
console.error("LinuxUsersLinuxMint: 404 not found error. Sorry! The page or content you are trying to search for on this website may have been moved or deleted...");
10-
alert("404 not found error");
11-
}
1+
window.onload = function() {
2+
var lang = navigator.language;
3+
var ErrorTitle = document.getElementById("ErrorTitle");
4+
var ErrorDescription = document.getElementById("ErrorDescription");
5+
var MainPage = document.getElementById("MainPage");
6+
var SupportPage = document.getElementById("SupportPage");
7+
8+
if (lang.startsWith("en")) {
9+
ErrorTitle.innerHTML = "404 not found error";
10+
ErrorDescription.innerHTML = "The page you are looking for was not found or the page does not exist 404 not found error.";
11+
MainPage.innerHTML = "LinuxUsersLinuxMint - Main page";
12+
SupportPage.innerHTML = "LinuxUsersLinuxMint - Support page";
13+
console.error("LinuxUsersLinuxMint: 404 not found error. Sorry! The page or content you are trying to search for on this website may have been moved or deleted...");
14+
alert("404 not found error");
15+
document.title = "LinuxUsersLinuxMint - 404 Not found";
16+
MainPage.href = "https://linuxuserslinuxmint.github.io";
17+
SupportPage.href = "/support/index_en.html";
18+
}
19+
else if (lang.startsWith("tr")) {
20+
ErrorTitle.innerHTML = "404 bulunamadı hatası";
21+
ErrorDescription.innerHTML = "Aradığınız sayfa bulunamadı veya sayfa mevcut değil 404 bulunamadı hatası.";
22+
MainPage.innerHTML = "LinuxUsersLinuxMint - Ana sayfa";
23+
SupportPage.innerHTML = "LinuxUsersLinuxMint - Destek sayfası";
24+
console.error("LinuxUsersLinuxMint: 404 bulunamadı hatası. Üzgünüm! bu web sitesinde aramaya çalıştığınız sayfa veya içerik taşınmış veya silinmiş olabilir...");
25+
alert("404 bulunamadı hatası");
26+
document.title = "LinuxUsersLinuxMint - 404 bulunamadı";
27+
MainPage.href = "https://linuxuserslinuxmint.github.io";
28+
SupportPage.href = "/support/index_tr.html";
29+
}
30+
};

0 commit comments

Comments
 (0)