diff --git a/src/components/FullscreenAdBanner.js b/src/components/FullscreenAdBanner.js new file mode 100755 index 00000000..db2e5f5e --- /dev/null +++ b/src/components/FullscreenAdBanner.js @@ -0,0 +1,107 @@ +import React, { useEffect, useRef } from "react"; + +const FullscreenAdBanner = () => { + const desktopIframeRef = useRef(null); + const mobileIframeRef = useRef(null); + + useEffect(() => { + // Initialize Desktop/Tablet Ad (728x90) + if (desktopIframeRef.current) { + const iframe = desktopIframeRef.current; + const doc = iframe.contentDocument || iframe.contentWindow.document; + + doc.open(); + doc.write(` + + + + + + + + + + + `); + doc.close(); + } + + // Initialize Mobile Ad (320x50) using the existing mobile key + if (mobileIframeRef.current) { + const iframe = mobileIframeRef.current; + const doc = iframe.contentDocument || iframe.contentWindow.document; + + doc.open(); + doc.write(` + + + + + + + + + + + `); + doc.close(); + } + }, []); + + return ( + <> + {/* Desktop & Tablet View (>= 768px) */} +
+