Skip to content

Instantly share code, notes, and snippets.

@captain-blue210
Created January 20, 2021 02:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save captain-blue210/0ec01afa1356b1cb5eca04b5f39c1319 to your computer and use it in GitHub Desktop.
Save captain-blue210/0ec01afa1356b1cb5eca04b5f39c1319 to your computer and use it in GitHub Desktop.
Getting Amazon short URL
javascript: (function () {
const title = document.title.split('|')[0].trim();
const url = `https://www.amazon.co.jp/dp/${ue_pti}`;
const markdown = `[${title}](${url})`;
navigator.clipboard.writeText(markdown).then(function () {
alert(`URL Copied! : ${markdown}`);
}, function () {
alert('URL Copy failed..')
})
})()
@captain-blue210
Copy link
Author

Usage

Add a new bookmark and paste the script in the URL.

Notice

I only confirmed that it works in Chrome!

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