diff --git a/src/routes/_actions/addInstance.js b/src/routes/_actions/addInstance.js index 1db0069b..1cf0eeae 100644 --- a/src/routes/_actions/addInstance.js +++ b/src/routes/_actions/addInstance.js @@ -15,8 +15,7 @@ function createKnownError (message) { } function getRedirectUri () { - const { copyPasteMode } = store.get() - return copyPasteMode ? 'urn:ietf:wg:oauth:2.0:oob' : `${location.origin}/settings/instances/add` + return `${location.origin}/settings/instances/add` } async function redirectToOauth () { @@ -45,13 +44,8 @@ async function redirectToOauth () { redirectUri ) // setTimeout to allow the browser to *actually* save the localStorage data (fixes Safari bug apparently) - const { copyPasteMode } = store.get() setTimeout(() => { - if (copyPasteMode) { - window.open(oauthUrl, '_blank', 'noopener') - } else { - document.location.href = oauthUrl - } + document.location.href = oauthUrl }, 200) } @@ -102,8 +96,7 @@ async function registerNewInstance (code) { loggedInInstances: loggedInInstances, currentInstance: currentRegisteredInstanceName, loggedInInstancesInOrder: loggedInInstancesInOrder, - instanceThemes: instanceThemes, - copyPasteMode: false + instanceThemes: instanceThemes }) store.save() const { enableGrayscale } = store.get() @@ -124,16 +117,3 @@ export async function handleOauthCode (code) { store.set({ logInToInstanceLoading: false }) } } - -export async function handleCopyPasteOauthCode (code) { - const { currentRegisteredInstanceName, currentRegisteredInstance } = store.get() - if (!currentRegisteredInstanceName || !currentRegisteredInstance) { - store.set({ - logInToInstanceError: 'You must log in to an instance first.', - logInToInstanceErrorForText: '', - instanceNameInSearch: '' - }) - } else { - await handleOauthCode(code) - } -} diff --git a/src/routes/_pages/settings/instances/add.html b/src/routes/_pages/settings/instances/add.html index 0f2fa9ae..9e20a8c0 100644 --- a/src/routes/_pages/settings/instances/add.html +++ b/src/routes/_pages/settings/instances/add.html @@ -33,19 +33,6 @@ Log in - - {#if $copyPasteMode } -
- - - -
- {/if} {#if !$isUserLoggedIn} @@ -59,23 +46,6 @@ Join Mastodon!

{/if} -

- {#if $copyPasteMode} - Switch back to - {:else} - Trouble logging in? Switch to - {/if} - . -

- {#if $copyPasteMode} - - In basic login mode, click "log in" to open a new window. Then copy the code and paste it above. - - {/if}