21 lines
458 B
JavaScript
21 lines
458 B
JavaScript
|
import { createAdapter, toNostrAdapter } from "./adapter";
|
||
|
|
||
|
let adapters = [];
|
||
|
|
||
|
function main() {
|
||
|
let settings = localStorage.getItem("settings");
|
||
|
if (settings != null) {
|
||
|
for (let s of settings.adapters) {
|
||
|
switch (s.protocol) {
|
||
|
case "nostr":
|
||
|
let a = toNostrAdapter(createAdapter(), s);
|
||
|
adapters.push(a);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
console.log("no settings exist for this client");
|
||
|
}
|
||
|
};
|
||
|
|
||
|
main();
|