1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-26 15:04:19 +01:00

use gateway api by default

This commit is contained in:
Enrico Fasoli 2015-12-23 18:55:04 +01:00
parent aecf89339c
commit 34da7fcc07
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,9 @@ module.exports = {
} catch (e) { } catch (e) {
// Do nothing // Do nothing
} }
if (opt === null || opt === undefined) opt = { addr: 'localhost', port: 5001 } if (opt === null || opt === undefined) {
opt = { addr: window.location.hostname, port: window.location.port }
}
return opt return opt
} }
} }

View File

@ -4,7 +4,7 @@ var Icon = require('icon.jsx')
module.exports = function (boardsAPI) { module.exports = function (boardsAPI) {
return React.createClass({ return React.createClass({
getDefaults: function () { getDefaults: function () {
return { addr: 'localhost', port: 5001, api: false } return { addr: window.location.hostname, port: window.location.port, api: false }
}, },
getInitialState: function () { getInitialState: function () {
var s = window.localStorage.getItem('ipfs-boards-settings') var s = window.localStorage.getItem('ipfs-boards-settings')