@internetstiftelsen/styleguide 5.0.14-beta.0.14 → 5.0.14-beta.0.16
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) {
|
|
@@ -151,7 +153,6 @@ function delegateClick(e) {
|
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
153
155
|
|
|
154
|
-
loadYoutubeAPI();
|
|
155
156
|
el.youtube.playVideo();
|
|
156
157
|
}
|
|
157
158
|
|
package/package.json
CHANGED
package/src/assets/js/youtube.js
CHANGED
|
@@ -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) {
|
|
@@ -134,7 +136,6 @@ function delegateClick(e) {
|
|
|
134
136
|
return;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
loadYoutubeAPI();
|
|
138
139
|
el.youtube.playVideo();
|
|
139
140
|
}
|
|
140
141
|
|