Last active
November 28, 2022 02:58
-
-
Save jeiea/514c8c0862710cc04aa9cbb5ac465c84 to your computer and use it in GitHub Desktop.
Open web notion link in desktop 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 notion in app | |
// @namespace https://gist.github.com/jeiea/514c8c0862710cc04aa9cbb5ac465c84 | |
// @downloadURL https://gist.github.com/jeiea/514c8c0862710cc04aa9cbb5ac465c84/raw/open_in_notion.user.js | |
// @version 0.3 | |
// @description Useful with slack integration. | |
// @author jeiea | |
// @match https://www.notion.so/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=notion.so | |
// @grant window.close | |
// ==/UserScript== | |
if (location.pathname.match(/-?[0-9a-z]{32}$/i)) { | |
location.href = location.href.replace('https://', 'notion://'); | |
setTimeout(() => { | |
window.close(); | |
}, 2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment