Skip to content

Instantly share code, notes, and snippets.

@mary-ext
Last active May 4, 2026 06:19
Show Gist options
  • Select an option

  • Save mary-ext/93c01e11b954ef1b5ed3c5fd995e60b8 to your computer and use it in GitHub Desktop.

Select an option

Save mary-ext/93c01e11b954ef1b5ed3c5fd995e60b8 to your computer and use it in GitHub Desktop.
Bypass Slack's switch-to-app nag screen
slack.com##+js(user-slack-remove-app-switch-nag.js)
if (location.hostname !== 'slack.com' && location.hostname !== 'app.slack.com') {
const match = location.pathname.match(/^\/archives\/([^/]+)\/p(\d+)/);
if (match) {
const [, channelId, pTs] = match;
const params = new URLSearchParams(location.search);
const ts = params.get('thread_ts') ?? `${pTs.slice(0, -6)}.${pTs.slice(-6)}`;
location.replace(`/messages/${channelId}/convo/${channelId}-${ts}`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment