Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
Created October 17, 2024 05:23
Show Gist options
  • Save thewisenerd/0f23f06fad06f200ad7793d033eed2f7 to your computer and use it in GitHub Desktop.
Save thewisenerd/0f23f06fad06f200ad7793d033eed2f7 to your computer and use it in GitHub Desktop.
Open Slack in Browser, not App
// ==UserScript==
// @name Open Slack in Browser, not App
// @match https://*.slack.com/ssb/redirect
// @match https://*.slack.com/archives/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.onload = function() {
const el = document.querySelectorAll("p.p-ssb_redirect__loading_messages > a.c-link").values().filter(x => x.innerText == 'open this link in your browser').next();
if (el && el.value) {
el.value.click();
}
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment