@internetstiftelsen/styleguide 2.24.15 → 2.24.16-beta.0.1
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.
- package/package.json +3 -3
- package/src/organisms/podcast/podcast.js +25 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetstiftelsen/styleguide",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.16-beta.0.1",
|
|
4
4
|
"main": "dist/components.js",
|
|
5
5
|
"ports": {
|
|
6
6
|
"fractal": "3000"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"create-icons-config": "node ./createIconsJson"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@frctl/fractal": "^1.5.
|
|
44
|
-
"@frctl/mandelbrot": "^1.
|
|
43
|
+
"@frctl/fractal": "^1.5.14",
|
|
44
|
+
"@frctl/mandelbrot": "^1.10.2",
|
|
45
45
|
"@internetstiftelsen/eslint-config": "^0.0.5",
|
|
46
46
|
"@internetstiftelsen/stylelint-config": "^1.0.0",
|
|
47
47
|
"babel-cli": "^6.26.0",
|
|
@@ -163,29 +163,31 @@ if (stepBackward) {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// Handle continous play when user leaves the page
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
166
|
+
if (podCast) {
|
|
167
|
+
window.addEventListener('unload', () => {
|
|
168
|
+
const podcastData = {
|
|
169
|
+
podCastTitle: title.innerHTML,
|
|
170
|
+
episodeDescription: description.innerHTML,
|
|
171
|
+
episodeSrc: audio.src,
|
|
172
|
+
episodeCurrentTime: audio.currentTime,
|
|
173
|
+
episodeDuration: durationElement.innerHTML,
|
|
174
|
+
episodeImage: image.src,
|
|
175
|
+
};
|
|
176
|
+
localStorage.setItem('episodeData', JSON.stringify(podcastData));
|
|
177
|
+
|
|
178
|
+
if (!audio.paused) {
|
|
179
|
+
let existing = localStorage.getItem('episodeData');
|
|
180
|
+
existing = existing ? JSON.parse(existing) : {};
|
|
181
|
+
existing.podcastWasPlaying = true;
|
|
182
|
+
localStorage.setItem('episodeData', JSON.stringify(existing));
|
|
183
|
+
} else {
|
|
184
|
+
let existing = localStorage.getItem('episodeData');
|
|
185
|
+
existing = existing ? JSON.parse(existing) : {};
|
|
186
|
+
existing.podcastWasPlaying = false;
|
|
187
|
+
localStorage.setItem('episodeData', JSON.stringify(existing));
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
189
191
|
|
|
190
192
|
if (localStorage.getItem('episodeData') && podCast) {
|
|
191
193
|
const arr = JSON.parse(localStorage.getItem('episodeData'));
|