This commit is contained in:
62
index.html
Normal file
62
index.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<script>
|
||||
// AGGRESSIF KONSOL TEMIZLIGI - Chrome Extension Hataları İçin
|
||||
window.onerror = function (message, source, lineno, colno, error) {
|
||||
if (message && typeof message === 'string' && (message.includes('message port closed') || message.includes('The message port closed before a response was received'))) {
|
||||
return true; // Hatanın konsola yazılmasını engelle
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('unhandledrejection', function (event) {
|
||||
// Promise rejection mesajını yakala
|
||||
const msg = event.reason?.message || event.reason;
|
||||
if (msg && typeof msg === 'string' && (msg.includes('message port closed') || msg.includes('The message port closed before a response was received'))) {
|
||||
event.preventDefault(); // Tarayıcının konsola yazmasını engelle
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
// Console.error override
|
||||
const originalConsoleError = console.error;
|
||||
console.error = function (...args) {
|
||||
const msg = args[0];
|
||||
if (msg && (
|
||||
(typeof msg === 'string' && (msg.includes('message port closed') || msg.includes('The message port closed before a response was received'))) ||
|
||||
(typeof msg === 'object' && msg.message && (msg.message.includes('message port closed') || msg.message.includes('The message port closed before a response was received')))
|
||||
)) {
|
||||
return; // Yoksay
|
||||
}
|
||||
originalConsoleError.apply(console, args);
|
||||
};
|
||||
</script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>DigiCraft</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap"
|
||||
rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: 'Playfair Display', serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="bg-stone-50 text-stone-900">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/index.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user