Skip to content

Instantly share code, notes, and snippets.

View alexeagle's full-sized avatar
🌿
Making a better Bazel

Alex Eagle alexeagle

🌿
Making a better Bazel
View GitHub Profile
@alexeagle
alexeagle / titleUrlMarkdownClip.js
Last active August 3, 2023 19:13 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;