Digesting links in broadcast and injecting (still need to remove all other HTML)

This commit is contained in:
James Barnsley
2019-02-05 17:04:32 +13:00
parent bdc9935596
commit 31e62fdf81
7 changed files with 51 additions and 12 deletions

View File

@ -7,9 +7,16 @@ export function getBroadcasts(){
return (dispatch, getState) => {
var config = {
method: 'GET',
timeout: 15000,
url: 'https://gist.githubusercontent.com/jaedb/b677dccf80daf3ccb2ef12e96e495677/raw'
timeout: 15000
}
// Fetch the "iris_broadcasts.json" file from Gist (or "_test" for test mode)
if (getState().ui.test_mode){
config.url = 'https://gist.githubusercontent.com/jaedb/cb3a5ee6909632abb2e0fe66d4c8c311/raw'
} else {
config.url = 'https://gist.githubusercontent.com/jaedb/b677dccf80daf3ccb2ef12e96e495677/raw'
}
$.ajax(config).then(
response => {
dispatch({