Skip to content

Commit a497525

Browse files
authored
Merge pull request #3638 from processing/fix-banner-embed
Fix banner embed
2 parents 7a52a44 + 325350d commit a497525

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

client/index.jsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@ const initialState = window.__INITIAL_STATE__;
2020

2121
const store = configureStore(initialState);
2222

23-
// Add a banner to the page
24-
const banner = document.createElement('div');
25-
banner.id = 'processing-banner';
26-
document.body.appendChild(banner);
23+
if (
24+
window.location.href.indexOf('full') === -1 &&
25+
window.location.href.indexOf('embed') === -1
26+
) {
27+
// Add a banner to the page
28+
const banner = document.createElement('div');
29+
banner.id = 'processing-banner';
30+
document.body.appendChild(banner);
2731

28-
const link = document.createElement('link');
29-
link.rel = 'stylesheet';
30-
link.href = 'https://foundation-donate-banner.netlify.app/static/css/main.css';
31-
document.head.appendChild(link);
32+
const link = document.createElement('link');
33+
link.rel = 'stylesheet';
34+
link.href =
35+
'https://foundation-donate-banner.netlify.app/static/css/main.css';
36+
document.head.appendChild(link);
3237

33-
const script = document.createElement('script');
34-
script.src = 'https://foundation-donate-banner.netlify.app/static/js/main.js';
35-
document.body.appendChild(script);
38+
const script = document.createElement('script');
39+
script.src = 'https://foundation-donate-banner.netlify.app/static/js/main.js';
40+
document.body.appendChild(script);
3641

37-
if (window.location.href.indexOf('full') === -1) {
3842
const buttonScript = document.createElement('script');
3943
buttonScript.type = 'text/javascript';
4044
buttonScript.defer = true;

0 commit comments

Comments
 (0)