Strip out @acct@ from instance URL when log in
This commit is contained in:
parent
3d2b7f683c
commit
20e569da0c
1 changed files with 3 additions and 1 deletions
|
@ -40,7 +40,9 @@ function Login() {
|
||||||
const { elements } = e.target;
|
const { elements } = e.target;
|
||||||
let instanceURL = elements.instanceURL.value.toLowerCase();
|
let instanceURL = elements.instanceURL.value.toLowerCase();
|
||||||
// Remove protocol from instance URL
|
// Remove protocol from instance URL
|
||||||
instanceURL = instanceURL.replace(/(^\w+:|^)\/\//, '');
|
instanceURL = instanceURL.replace(/^https?:\/\//, '').replace(/\/+$/, '');
|
||||||
|
// Remove @acct@ or acct@ from instance URL
|
||||||
|
instanceURL = instanceURL.replace(/^@?[^@]+@/, '');
|
||||||
store.local.set('instanceURL', instanceURL);
|
store.local.set('instanceURL', instanceURL);
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue