Is there a way to select only the path component of an url, similar to how command + L select the entire url?


I want to select only the section in brackets.

  • There are a couple of extensions that copy the whole URL to the clipboard. I will try to fork one and see if I can modify it! – slhck Apr 28 '11 at 10:43

Update: The extension below was updated and renamed to Template which seems to provide what you were looking for.

I forked NeoCotic's URL-Copy Chrome extension and reprogrammed it to add another option.

It now has the option to just copy the path:

enter image description here

... which does exactly what you need. So, for example, http://superuser.com/questions/276362/ is copied as questions/276362/.

In order to install it, you must

  • download the prebuilt ZIP file and unzip it somewhere
  • Go to the Wrench menu - Tools - Extensions
  • Click the Developer sign in the upper right corner
  • Click Load unpacked extension... and select the unzipped folder:

enter image description here

Et voila! It's still far from perfect, but I'll contact the developer.

  • why don't you just submit it to chrome web store? – user Apr 28 '11 at 17:16
  • @crucified soul Because 1) it's not my own work and already released as a Chrome extension 2) it's not fully implemented (icons and options missing) and 3) I contacted the developers to integrate it into their extension if they like – slhck Apr 28 '11 at 20:24
  • Excellent, that is some impressive effort for an answer! :) – sandstrom Apr 30 '11 at 7:02
  • No problem, I was bored at work haha :) – slhck Apr 30 '11 at 7:11
  • 1
    Apologies and well cited :) Template can do exactly what the OP wanted. He simply needs to create a new Template (via the Options page) with the contents {path}. It's that easy. – Alasdair Mar 8 '12 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.