This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #347 from alexander-heimbuch/feature/deeplink
Feature/deeplink
- Loading branch information
Showing
8 changed files
with
85 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import urlConfig from 'utils/url' | ||
import remoteConfig from 'utils/request' | ||
|
||
import app from '../app' | ||
|
||
remoteConfig(urlConfig.episode) | ||
.then(config => Object.assign({}, config, urlConfig)) | ||
.then(config => Object.assign({}, config, {mode: 'share'})) | ||
.then(app) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import curry from 'lodash/fp/curry' | ||
|
||
export const findNode = selector => document.querySelectorAll(selector) | ||
export const createNode = tag => document.createElement(tag) | ||
export const appendNode = curry((node, child) => node.appendChild(child)) | ||
|
||
export const tag = curry((tag, value = '', attributes = {}) => { | ||
let attr = Object.keys(attributes).map(attribute => ` ${attribute}="${attributes[attribute]}"`) | ||
|
||
attr = attr.join('') | ||
return `<${tag}${attr}>${value}</${tag}>` | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import request from 'superagent' | ||
|
||
export default episode => | ||
request | ||
.get(episode) | ||
.query({ format: 'json' }) | ||
.set('Accept', 'application/json') | ||
.then(res => res.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import queryString from 'query-string' | ||
import { timeToSeconds } from 'utils/time' | ||
|
||
const params = queryString.parse(window.location.search) | ||
|
||
const parsePlaytime = parameters => { | ||
if (parameters.playtime) { | ||
return { | ||
playtime: timeToSeconds(parameters.playtime) | ||
} | ||
} | ||
|
||
return {} | ||
} | ||
|
||
export default Object.assign({}, params, parsePlaytime(params)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters