kopia lustrzana https://github.com/cheeaun/phanpy
Strip out @acct@ from instance URL when log in
rodzic
3d2b7f683c
commit
20e569da0c
|
@ -40,7 +40,9 @@ function Login() {
|
|||
const { elements } = e.target;
|
||||
let instanceURL = elements.instanceURL.value.toLowerCase();
|
||||
// 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);
|
||||
|
||||
(async () => {
|
||||
|
|
Ładowanie…
Reference in New Issue