Skip to content

Instantly share code, notes, and snippets.

@hgezim
Created March 13, 2020 23:52
Show Gist options
  • Save hgezim/3b0dcc5220673a08b16139344d49a398 to your computer and use it in GitHub Desktop.
Save hgezim/3b0dcc5220673a08b16139344d49a398 to your computer and use it in GitHub Desktop.
function bufferShare() {
const url = encodeURIComponent(window.location.href);
const title = encodeURIComponent(window.document.title);
const bufferUrl = `https://buffer.com/add?url=${url}&text=${title}`;
window.open(bufferUrl);
}
bufferShare();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment