Created
November 23, 2020 10:19
-
-
Save ricealexander/7d1b9070cb896a4b1ab3ae51d2841b20 to your computer and use it in GitHub Desktop.
Grove Posts share on Facebook, Twitter, LinkedIn, Email. Here's some logic for a Reddit Share link
This file contains hidden or 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
function redditShareLink () { | |
const { storyTitle } = window.Glade.getMetadata() | |
const title = storyTitle ?? document.title | |
const url = document.location.href | |
return `https://www.reddit.com/submit?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment