Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created September 8, 2023 14:56
Show Gist options
  • Save ericboehs/3b9cf27b0bec015186bebe7081f59c21 to your computer and use it in GitHub Desktop.
Save ericboehs/3b9cf27b0bec015186bebe7081f59c21 to your computer and use it in GitHub Desktop.
// ==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