@astronox/core 0.4.11 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,8 +9,31 @@ type Props = {
|
|
|
9
9
|
const { config }: Props = Astro.props;
|
|
10
10
|
const clientId = toAdsenseClientId(config.publisherId);
|
|
11
11
|
const scriptSource = `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${encodeURIComponent(clientId)}`;
|
|
12
|
+
const adBlockingRecoverySource = `https://fundingchoicesmessages.google.com/i/${encodeURIComponent(config.publisherId)}?ers=1`;
|
|
12
13
|
---
|
|
13
14
|
|
|
15
|
+
<script is:inline async src={adBlockingRecoverySource}></script>
|
|
16
|
+
<script is:inline>
|
|
17
|
+
(() => {
|
|
18
|
+
const signalGooglefcPresent = () => {
|
|
19
|
+
if (window.frames['googlefcPresent']) return;
|
|
20
|
+
|
|
21
|
+
if (!document.body) {
|
|
22
|
+
setTimeout(signalGooglefcPresent, 0);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const frame = document.createElement('iframe');
|
|
27
|
+
frame.name = 'googlefcPresent';
|
|
28
|
+
frame.style.cssText =
|
|
29
|
+
'display: none; width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;';
|
|
30
|
+
document.body.appendChild(frame);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
signalGooglefcPresent();
|
|
34
|
+
})();
|
|
35
|
+
</script>
|
|
36
|
+
|
|
14
37
|
<meta name="google-adsense-account" content={clientId} />
|
|
15
38
|
<script is:inline async crossorigin="anonymous" src={scriptSource}></script>
|
|
16
39
|
|