Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Jul 3, 2023
1 parent 7d30ed4 commit 6520035
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/content.ts
Expand Up @@ -21,7 +21,7 @@ import {BTDMessageOriginsEnum, BTDMessages} from './types/btdMessageTypes';

if (hasNewTweetDeck) {
console.debug('Better TweetDeck aborted loading on TweetDeck Preview');
if (localStorage.getItem('ROLLBACK_TO_LEGACY') === 'true') {
if (localStorage.getItem('STOP_ROLLBACK_TO_LEGACY') === 'true') {
return;
}
rollbackToLegacy();
Expand Down
5 changes: 2 additions & 3 deletions src/services/rollbackToLegacy.tsx
Expand Up @@ -8,7 +8,7 @@ import {getExtensionUrl, getExtensionVersion} from '../helpers/webExtensionHelpe
export const ROLLBACK_TO_LEGACY = 'ROLLBACK_TO_LEGACY';

export function rollbackToLegacy() {
if (localStorage.getItem('ROLLBACK_TO_LEGACY') === 'true') {
if (localStorage.getItem('STOP_ROLLBACK_TO_LEGACY') === 'true') {
return;
}
if (document.getElementById('btd-rollback-dialog-root')) {
Expand Down Expand Up @@ -62,7 +62,7 @@ const RollbackDialog = (props: {onCancel: () => void}) => {
<div className="buttons">
<SettingsButton
onClick={() => {
localStorage.setItem('ROLLBACK_TO_LEGACY', String(true));
localStorage.setItem('STOP_ROLLBACK_TO_LEGACY', String(true));
props.onCancel();
}}
variant="secondary">
Expand All @@ -77,7 +77,6 @@ const RollbackDialog = (props: {onCancel: () => void}) => {
</SettingsButton>
<SettingsButton
onClick={() => {
localStorage.setItem('ROLLBACK_TO_LEGACY', String(true));
document.cookie = 'tweetdeck_version=legacy';
window.location.reload();
}}
Expand Down

0 comments on commit 6520035

Please sign in to comment.