1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-02-04 16:34:19 +01:00
ipfs-boards/webapp/components/options.jsx
2015-12-23 18:55:04 +01:00

16 lines
343 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: window.location.hostname, port: window.location.port }
}
return opt
}
}