@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.24.15",
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.8",
44
- "@frctl/mandelbrot": "^1.9.2",
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
- window.addEventListener('unload', () => {
167
- const podcastData = {
168
- podCastTitle: title.innerHTML,
169
- episodeDescription: description.innerHTML,
170
- episodeSrc: audio.src,
171
- episodeCurrentTime: audio.currentTime,
172
- episodeDuration: durationElement.innerHTML,
173
- episodeImage: image.src,
174
- };
175
- localStorage.setItem('episodeData', JSON.stringify(podcastData));
176
-
177
- if (!audio.paused) {
178
- let existing = localStorage.getItem('episodeData');
179
- existing = existing ? JSON.parse(existing) : {};
180
- existing.podcastWasPlaying = true;
181
- localStorage.setItem('episodeData', JSON.stringify(existing));
182
- } else {
183
- let existing = localStorage.getItem('episodeData');
184
- existing = existing ? JSON.parse(existing) : {};
185
- existing.podcastWasPlaying = false;
186
- localStorage.setItem('episodeData', JSON.stringify(existing));
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'));