Skip to content

Instantly share code, notes, and snippets.

@rey
Last active May 29, 2025 12:12
Show Gist options
  • Save rey/bf794fb2cf3a2d7e9ab2c48900eb6332 to your computer and use it in GitHub Desktop.
Save rey/bf794fb2cf3a2d7e9ab2c48900eb6332 to your computer and use it in GitHub Desktop.
A handy bookmarklet that displays the active webpage's title, meta description, and URL

deets

About

I used a machine to create this bookmarklet because I was getting increasingly frustrated with how difficult it is to copy and paste a webpage's title.

Code

javascript:(function(){const%20title=document.title;const%20description=document.querySelector('meta[name="description"]')?.getAttribute('content')||'';const%20url=window.location.href;alert(`Title:\n${title}\n\nDescription:\n${description}\n\nURL:\n${url}`);})();

Install

  1. Open a new tab and surf to about:blank.
  2. Add the URL to your Favourites Bar.
  3. Right-click, Rename, change to something like deets.
  4. Right-click, Edit, paste in the above JavaScript code.
  5. Fin!

🧘

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