Copy from address bar as Markdown URL with title


I’m new to POPCLIP , I want to copy a safari url in following format

[PopClip Forum](

instead of what PopClip does now which is simply


Great idea! Never thought of that one and it is definitely possible. I’ll see what I can do. Welcome, @prashant.

1 Like

Great to hear ! looking forward

doesn’t one of brett terpstra’s extensions do just that? but i am not sure if they work with the new popclip…

@noone - welcome to the forum! I don’t think any of Brett’s do exactly what @prashant is asking, but he does have a lot of cool extensions. I think they all ought to still work.

I put together the following extension snippet as a first approximation to the requirement here. In normal circumstances it behaves similarly to the regular to copy, except when copying from the address bar of a browser*, in which cases it copies as a markdown link.

# popclip extension to copy URL from address bar as markdown with title
name: Copy +MD Link
title: Copy
javascript: |
  if (popclip.input.text === popclip.context.browserUrl) {
  } else {

(The above block is an extension snippet - select it to install the extension with PopClip)

*won’t work in Firefox because PopClip can’t detect the browser URL and title there

1 Like

Hi NIck,
Thanks for this.

I’ve installed it thanks to Popclip magic !

1 Like

Hi NIck,

Thanks for this. This is really helpful !

:smiley: :sparkles: good to hear!

I’ve just used it myself while writing a markdown document … pretty handy extension :star_struck:

Hi Nick,

Can I include some regex magic inside this ?

The URL I’m trying to capture as Markdown is

[What I want]

But I would like to avoid everything after ? basically User identifier from amazon , from regex perspective , it simply

Find : (\?.*) Replace with (nothing)
so Above URL becomes

One possible approach:

# popclip
name: Copy Markdown Link
title: Copy
javascript: |
  let url = popclip.context.browserUrl
  if (popclip.input.text === url) {
    url = url.split('?')[0]
  } else {