Skip to content

Commit ce9cb1d

Browse files
committed
Load script after cookie banner div is added
1 parent 8324e76 commit ce9cb1d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.storybook/manager-head.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
2+
<div id="cookie-banner"></div>
3+
<footer class="storybook-footer">
4+
Microsoft Graph Toolkit Playground was founded by Microsoft as a community guided, open source project.
5+
<a href="https://privacy.microsoft.com/en-us/privacystatement">Privacy & cookies</a>
6+
<a href="https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default">Term of use</a>
7+
</footer>
8+
19
<script src="https://consentdeliveryfd.azurefd.net/mscc/lib/v2/wcp-consent.js"></script>
210
<script src="https://az725175.vo.msecnd.net/scripts/jsll-4.js" type="text/javascript"></script>
311
<script type="text/javascript">
@@ -6,7 +14,7 @@
614
'cookie-banner',
715
function(err, _siteConsent) {
816
if (err != undefined) {
9-
return error;
17+
return err;
1018
} else {
1119
siteConsent = _siteConsent; //siteConsent is used to get the current consent
1220
}
@@ -15,6 +23,7 @@
1523
);
1624

1725
function onConsentChanged(consentCategories) {
26+
console.log('consentCatogories', consentCategories);
1827
if (siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics)) {
1928
// add analytics
2029
var config = {
@@ -29,13 +38,7 @@
2938
}
3039
}
3140
</script>
32-
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
33-
<div id="cookie-banner"></div>
34-
<footer class="storybook-footer">
35-
Microsoft Graph Toolkit Playground was founded by Microsoft as a community guided, open source project.
36-
<a href="https://privacy.microsoft.com/en-us/privacystatement">Privacy & cookies</a>
37-
<a href="https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default">Term of use</a>
38-
</footer>
41+
3942
<style>
4043
#root > div:first-of-type {
4144
height: calc(100% - 40px);

0 commit comments

Comments
 (0)