Update index.html
This commit is contained in:
+8
-16
@@ -15,23 +15,15 @@
|
|||||||
<div id="body_index"><div id="ref_div" align="center"><h1 id="ref">-You are being redirected to the homepage-</h1></div></div>
|
<div id="body_index"><div id="ref_div" align="center"><h1 id="ref">-You are being redirected to the homepage-</h1></div></div>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const userLang = navigator.language || navigator.userLanguage;
|
const userLang = navigator.language || navigator.userLanguage;
|
||||||
|
|
||||||
// İçeriği dil tercihine göre yükleme
|
// İçeriği dil tercihine göre yönlendirme
|
||||||
if (userLang.startsWith('tr')) {
|
if (userLang.startsWith('tr')) {
|
||||||
fetch('/hometr.html')
|
window.location.href = '/hometr.html'; // Türkçe içerik
|
||||||
.then(response => response.text())
|
} else {
|
||||||
.then(html => {
|
window.location.href = '/home.html'; // İngilizce içerik
|
||||||
document.documentElement.innerHTML = html; // Türkçe içeriği yükle
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
fetch('/home.html')
|
|
||||||
.then(response => response.text())
|
|
||||||
.then(html => {
|
|
||||||
document.documentElement.innerHTML = html; // İngilizce içeriği yükle
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
|
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
|
||||||
const showAlert = e => {
|
const showAlert = e => {
|
||||||
|
|||||||
Reference in New Issue
Block a user