Update src/app/layout.tsx
This commit is contained in:
@@ -2,7 +2,6 @@ import type { Metadata } from "next";
|
||||
import { Figtree } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ServiceWrapper } from "@/components/ServiceWrapper";
|
||||
import Tag from "@/tag/Tag";
|
||||
|
||||
const figtree = Figtree({
|
||||
variable: "--font-figtree", subsets: ["latin"],
|
||||
@@ -36,6 +35,38 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<head>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
(function() {
|
||||
try {
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.addedNodes.length) {
|
||||
mutation.addedNodes.forEach(function(node) {
|
||||
if (node.nodeType === 1) {
|
||||
if (node.id && node.id.includes('webild')) {
|
||||
node.remove();
|
||||
}
|
||||
if (node.className && typeof node.className === 'string' && node.className.includes('webild')) {
|
||||
node.remove();
|
||||
}
|
||||
if (node.tagName === 'IFRAME' && node.src && node.src.includes('webild')) {
|
||||
node.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
observer.observe(document.body, { childList: true, subtree: true });
|
||||
} catch(e) {}
|
||||
})();
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<ServiceWrapper>
|
||||
<body
|
||||
className={`${figtree.variable} antialiased`}
|
||||
@@ -45,17 +76,28 @@ export default function RootLayout({
|
||||
}}
|
||||
>
|
||||
<style jsx global>{`
|
||||
/* Hide Webild watermark */
|
||||
/* Hide Webild watermark and loading screen */
|
||||
[data-webild-watermark],
|
||||
.webild-watermark,
|
||||
[class*="watermark"],
|
||||
iframe[src*="webild"] {
|
||||
iframe[src*="webild"],
|
||||
[id*="webild"],
|
||||
.webild-loading,
|
||||
.webild-loader,
|
||||
[class*="loading"][class*="screen"] {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
min-width: 0 !important;
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
/* Hide any iframes that might be loading screens */
|
||||
iframe {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Performance optimizations */
|
||||
@@ -79,7 +121,6 @@ export default function RootLayout({
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
<Tag />
|
||||
{children}
|
||||
|
||||
<script
|
||||
|
||||
Reference in New Issue
Block a user