message: no-op on TweetDeck Preview
diff: @@ -14,6 +14,18 @@ import {injectInTD} from './services/injectInTD';
  import {setupBtdRoot} from './services/setupBTDRoot';
  import {BTDMessageOriginsEnum, BTDMessages} from './types/btdMessageTypes';
  +(async () => {
  + const hasNewTweetDeck =
  + document.cookie
  + .split('; ')
  + .find((r) => r.startsWith('tweetdeck_version'))
  + ?.split('=')[1] === 'beta' || document.getElementById('react-root');
  +
  + if (hasNewTweetDeck) {
  + console.debug('Better TweetDeck aborted loading on TweetDeck Preview');
  + return;
  + }
  +
  // Inject some scripts.
  injectInTD();
  @@ -60,13 +72,17 @@ listenToInternalBTDMessage(BTDMessages.BTD_READY, BTDMessageOriginsEnum.CONTENT,
  });
  });
  -listenToInternalBTDMessage(BTDMessages.OPEN_SETTINGS, BTDMessageOriginsEnum.CONTENT, async (ev) => {
  + listenToInternalBTDMessage(
  + BTDMessages.OPEN_SETTINGS,
  + BTDMessageOriginsEnum.CONTENT,
  + async (ev) => {
  if (ev.data.name !== BTDMessages.OPEN_SETTINGS) {
  return;
  }
  openSettings(ev.data.payload.selectedId);
  -});
  + }
  + );
  listenToInternalBTDMessage(
  BTDMessages.DOWNLOAD_MEDIA,
  @@ -122,3 +138,4 @@ function heartbeat() {
  setInterval(heartbeat, 30 * 1000);
  heartbeat();
  +})();
  