Created
July 26, 2019 11:49
-
-
Save Pezmc/982377cf62e40d26429418848abfdf3d to your computer and use it in GitHub Desktop.
Bookmarklet to get the current Basecamp URL as a helpful markdown link
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
function copytext(a) { | |
var b = document.createElement("textarea"); | |
b.innerText = a, document.body.appendChild(b), b.select(), document.execCommand("copy"), b.remove() | |
} | |
parts = new Set(); | |
parts.add(document.querySelector('meta[name="current-bucket-name').content); | |
parts.add(document.querySelector('meta[name="current-dock-tool-title"]').content); | |
parts.add(document.querySelector('meta[name="current-recording-title"]').content); | |
page_name = Array.from(parts).join(" › "); | |
copytext(`[${page_name}](${window.location})`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ready to use: