mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-02-04 16:34:19 +01:00
16 lines
343 B
JavaScript
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
|
|
}
|
|
}
|