File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,16 @@ export default function FooterWrapper(props) {
13
13
scriptElement . onload = ( ) => {
14
14
if ( typeof window !== 'undefined' ) {
15
15
window . onload = ( ) => {
16
- ; ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( { } )
16
+ if ( window . document . body . clientWidth <= 768 ) {
17
+ ; ( window . adsbygoogle = window . adsbygoogle || [ ] ) . push ( {
18
+ google_ad_client : 'ca-pub-7420210265158247' ,
19
+ enable_page_level_ads : true ,
20
+ overlays : { bottom : true } ,
21
+ } )
22
+ }
17
23
}
18
24
}
19
25
}
20
- document . body . appendChild ( scriptElement )
21
-
22
- if ( window . document . body . clientWidth <= 768 ) {
23
- const adsElement = document . createElement ( 'ins' )
24
- adsElement . classList . add ( 'adsbygoogle' )
25
- adsElement . classList . add ( 'adsanchor' )
26
- adsElement . setAttribute ( 'ad-client' , 'ca-pub-7420210265158247' )
27
- adsElement . setAttribute ( 'ad-slot' , '8159529807' )
28
- adsElement . setAttribute ( 'full-width-responsive' , 'true' )
29
- document . body . appendChild ( adsElement )
30
- }
31
26
}
32
27
} , [ ] )
33
28
You can’t perform that action at this time.
0 commit comments