mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Strip protocol from instance domain/uri
This commit is contained in:
parent
a2e47d7a6a
commit
e282f5df2a
1 changed files with 6 additions and 1 deletions
|
@ -377,7 +377,12 @@ function initMasto(params) {
|
||||||
} = info;
|
} = info;
|
||||||
if (uri || domain) {
|
if (uri || domain) {
|
||||||
const instances = store.local.getJSON('instances') || {};
|
const instances = store.local.getJSON('instances') || {};
|
||||||
instances[(domain || uri).toLowerCase()] = info;
|
instances[
|
||||||
|
(domain || uri)
|
||||||
|
.replace(/^https?:\/\//, '')
|
||||||
|
.replace(/\/+$/, '')
|
||||||
|
.toLowerCase()
|
||||||
|
] = info;
|
||||||
store.local.setJSON('instances', instances);
|
store.local.setJSON('instances', instances);
|
||||||
}
|
}
|
||||||
if (streamingApi || streaming) {
|
if (streamingApi || streaming) {
|
||||||
|
|
Loading…
Reference in a new issue