@@ -34,28 +34,30 @@ const script = document.createElement('script');
34
34
script . src = 'https://foundation-donate-banner.netlify.app/static/js/main.js' ;
35
35
document . body . appendChild ( script ) ;
36
36
37
- const buttonScript = document . createElement ( 'script' ) ;
38
- buttonScript . type = 'text/javascript' ;
39
- buttonScript . defer = true ;
40
- buttonScript . id = 'donorbox-popup-button-installer' ;
41
- buttonScript . src = 'https://donorbox.org/install-popup-button.js' ;
37
+ if ( window . location . href . indexOf ( 'full' ) === - 1 ) {
38
+ const buttonScript = document . createElement ( 'script' ) ;
39
+ buttonScript . type = 'text/javascript' ;
40
+ buttonScript . defer = true ;
41
+ buttonScript . id = 'donorbox-popup-button-installer' ;
42
+ buttonScript . src = 'https://donorbox.org/install-popup-button.js' ;
42
43
43
- buttonScript . setAttribute (
44
- 'data-href' ,
45
- 'https://donorbox.org/back-to-school-805292'
46
- ) ;
47
- buttonScript . setAttribute (
48
- 'data-style' ,
49
- // eslint-disable-next-line max-len
50
- 'background: #f1678e; color: #fff; text-decoration: none; font-family: Verdana, sans-serif; display: flex; gap: 8px; width: fit-content; font-size: 16px; border-radius: 0 0 5px 5px; line-height: 24px; position: fixed; top: 50%; transform-origin: center; z-index: 9999; overflow: hidden; padding: 8px 22px 8px 18px; right: 20px; left: auto; transform: translate(50%, -50%) rotate(90deg)'
51
- ) ;
52
- buttonScript . setAttribute ( 'data-button-cta' , 'Donate' ) ;
53
- buttonScript . setAttribute (
54
- 'data-img-src' ,
55
- 'https://donorbox.org/images/white_logo.svg'
56
- ) ;
44
+ buttonScript . setAttribute (
45
+ 'data-href' ,
46
+ 'https://donorbox.org/back-to-school-805292'
47
+ ) ;
48
+ buttonScript . setAttribute (
49
+ 'data-style' ,
50
+ // eslint-disable-next-line max-len
51
+ 'background: #f1678e; color: #fff; text-decoration: none; font-family: Verdana, sans-serif; display: flex; gap: 8px; width: fit-content; font-size: 16px; border-radius: 0 0 5px 5px; line-height: 24px; position: fixed; top: 50%; transform-origin: center; z-index: 9999; overflow: hidden; padding: 8px 22px 8px 18px; right: 20px; left: auto; transform: translate(50%, -50%) rotate(90deg)'
52
+ ) ;
53
+ buttonScript . setAttribute ( 'data-button-cta' , 'Donate' ) ;
54
+ buttonScript . setAttribute (
55
+ 'data-img-src' ,
56
+ 'https://donorbox.org/images/white_logo.svg'
57
+ ) ;
57
58
58
- document . body . appendChild ( buttonScript ) ;
59
+ document . body . appendChild ( buttonScript ) ;
60
+ }
59
61
60
62
const App = ( ) => (
61
63
< div >
0 commit comments