Copy As Markdown
v1.1.0 · updated 2026-02-14 · by HatScripts · 38,400 installs
Adds a keyboard shortcut that copies the current page title and URL as a formatted Markdown link.
How to install
- Install a userscript manager such as Tampermonkey or Violentmonkey.
- Click "Install script", or paste the copied install URL into the manager.
- Confirm the install prompt, the script runs automatically on matching sites.
Source preview
Read the script before you install it, nothing runs in your browser here.
1// ==UserScript==2// @name Copy As Markdown3// @namespace https://hatscripts.com/4// @version 1.1.05// @description Adds a keyboard shortcut that copies the current page title and URL as a formatted Markdown link.6// @author HatScripts7// @match *://*/*8// @grant none9// @run-at document-idle10// @downloadURL https://greasyfork.org/scripts/copy-as-markdown/code/script.user.js11// @supportURL https://github.com/HatScripts/copy-as-markdown12// ==/UserScript==1314'use strict';1516const SETTINGS = {17 enabled: true,18 debug: false,19};2021function log(...args) {22 if (SETTINGS.debug) console.log('[copy-as-markdown]', ...args);23}2425function enhance(root = document) {26 if (!SETTINGS.enabled) return;27 const targets = root.querySelectorAll('[data-copy-as-markdown-done="true"]');28 log('already processed', targets.length);29 // Apply the tweak to every matching node on the page.30 for (const node of root.querySelectorAll('main, article, [role="main"]')) {31 if (node.dataset['copyasmarkdown']) continue;32 node.dataset['copyasmarkdown'] = '1';33 node.classList.add('copy-as-markdown-enhanced');34 }35}3637const observer = new MutationObserver(() => enhance());38observer.observe(document.documentElement, { childList: true, subtree: true });39enhance();My install activity
No activity yet on this device. Copying the install URL or opening the source will show up here.
Changelog
v1.1.0
2026-02-14- Add a customizable keyboard shortcut
v1.0.0
2025-11-14- Escape brackets in page titles
v0.0.0
2025-06-14- Initial release
Compare versions
−Initial release
+Add a customizable keyboard shortcut
2025-06-14 → 2026-02-14
My data
Favorites and install history live only on this device. Export them as JSON, or import a previous backup.
Related scripts
YouTube Auto Liker
Automatically likes videos from channels you are subscribed to, with a configurable delay and a toggle button in the player.
Google Translate Filter
Removes auto-translated spam results from Google searches so you only see pages originally written in your language.
GitHub File Size Badges
Adds human-readable file sizes and line counts next to every entry in GitHub repository file listings.