Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created September 8, 2023 14:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
// ==UserScript==
// @name Slack Redirector
// @namespace boehs.com
// @include *://adhoc.slack.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(() => {
const regex = /https:\/\/adhoc\.slack\.com\/(.+)$/;
const input = window.location.href;
const match = input.match(regex);
if (match) {
const archive = match[1];
console.log("archive:" +archive);
const url = `https://oddball.slack.com/${archive}`;
window.location.replace(url);
}
})();
@ericboehs
Copy link
Author

For Userscripts in Safari. Should work in Tampermonkey or other user script extensions in Chrome/FF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment