Created
October 17, 2024 05:23
-
-
Save thewisenerd/0f23f06fad06f200ad7793d033eed2f7 to your computer and use it in GitHub Desktop.
Open Slack in Browser, not App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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