1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00
ipfs-boards/webapp/components/options.jsx
2015-12-14 00:29:25 +01:00

14 lines
300 B
JavaScript

module.exports = {
get: function () {
var opt
var s = window.localStorage.getItem('ipfs-boards-settings')
try {
opt = JSON.parse(s)
} catch (e) {
// Do nothing
}
if (opt === null || opt === undefined) opt = { addr: 'localhost', port: 5001 }
return opt
}
}