@internetstiftelsen/styleguide 5.0.14-beta.0.8 → 5.0.14

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.
@@ -18,6 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
18
 
19
19
  // TODO: Should probably implement a way to localize texts in the styleguide
20
20
  var consent = (0, _hasCookieConsent2.default)('C0004');
21
+
21
22
  var missingConsentMessage = 'För att spela Youtubefilmer krävs att "Riktade kakor" tillåts. Tryck för att "Anpassa kakor"';
22
23
 
23
24
  function loadYoutubeAPI() {
@@ -71,6 +72,7 @@ function createConsentWarning(el) {
71
72
  }
72
73
 
73
74
  function destroyConsentWarning(el) {
75
+ loadYoutubeAPI();
74
76
  var div = el.querySelector('[data-youtube-consent-warning]');
75
77
 
76
78
  if (div) {
@@ -83,7 +85,6 @@ function createCover(el) {
83
85
  createConsentWarning(el);
84
86
  } else {
85
87
  destroyConsentWarning(el);
86
- loadYoutubeAPI();
87
88
  }
88
89
 
89
90
  if (el.getElementsByTagName('img').length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "5.0.14-beta.0.8",
3
+ "version": "5.0.14",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -3,6 +3,7 @@ import className from './className';
3
3
  import hasCookieConsent from './hasCookieConsent';
4
4
 
5
5
  let consent = hasCookieConsent('C0004');
6
+
6
7
  const missingConsentMessage = 'För att spela Youtubefilmer krävs att "Riktade kakor" tillåts. Tryck för att "Anpassa kakor"';
7
8
 
8
9
  function loadYoutubeAPI() {
@@ -56,6 +57,7 @@ function createConsentWarning(el) {
56
57
  }
57
58
 
58
59
  function destroyConsentWarning(el) {
60
+ loadYoutubeAPI();
59
61
  const div = el.querySelector('[data-youtube-consent-warning]');
60
62
 
61
63
  if (div) {
@@ -68,7 +70,6 @@ function createCover(el) {
68
70
  createConsentWarning(el);
69
71
  } else {
70
72
  destroyConsentWarning(el);
71
- loadYoutubeAPI();
72
73
  }
73
74
 
74
75
  if (el.getElementsByTagName('img').length) {