Update 404.html
This commit is contained in:
@@ -19,5 +19,32 @@
|
|||||||
<p class="output">Please try to <a href="javascript:history.back()">go back</a> or <a href="/">return to the homepage</a>.</p>
|
<p class="output">Please try to <a href="javascript:history.back()">go back</a> or <a href="/">return to the homepage</a>.</p>
|
||||||
<p class="output">Good luck.</p>
|
<p class="output">Good luck.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const userLang = navigator.language || navigator.userLanguage;
|
||||||
|
|
||||||
|
// İçeriği dil tercihine göre yönlendirme
|
||||||
|
if (userLang.startsWith('tr')) {
|
||||||
|
window.location.href = '/home_tr'; // Türkçe içerik
|
||||||
|
} else {
|
||||||
|
window.location.href = '/home_en'; // İngilizce içerik
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
|
||||||
|
const showAlert = e => {
|
||||||
|
e.preventDefault(); // preventing its default behaviour
|
||||||
|
return alert("Sorry, you can't view or copy source codes this way!");
|
||||||
|
}
|
||||||
|
document.addEventListener("contextmenu", e => {
|
||||||
|
showAlert(e); // calling showAlert() function on mouse right click
|
||||||
|
});
|
||||||
|
document.addEventListener("keydown", e => {
|
||||||
|
// calling showAlert() function, if the pressed key matched to disabled keys
|
||||||
|
if((e.ctrlKey && disabledKeys.includes(e.key)) || e.key === "F12") {
|
||||||
|
showAlert(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user