dub icon indicating copy to clipboard operation
dub copied to clipboard

Create a short link from the currently open page

Open dandanio opened this issue 3 years ago • 6 comments
trafficstars

It would be a life saver if I could click a bookmark link in my bookmark bar and get a short link, like this: Link:

javascript:void(location.href='https://dub.sh/?longurl=%27+location.href);

or some such. And then I can paste it in slack, Messages, Twitter, etc. Quick and easy.

dandanio avatar Sep 24 '22 01:09 dandanio

Oooh interesting! You mean like a Chrome Extension?

steven-tey avatar Sep 24 '22 05:09 steven-tey

I think this could be added as a bookmarklet, people copy the js and bookmark it or drag the link into the bookmark bar.

This could either pass the URL to shorten as an argument in the dub.sh link like above or give an alert, both of which would require server changes.

I could try to work on updating the main page to add these links if the server gets updated if needed?

turtleship69 avatar Sep 24 '22 12:09 turtleship69

I think it is called a bookmarklet. It is a bookmark that is a JavaScript code. It creates a short link from the currently displayed page. The original wording was (courtesy of archive.org):

Quick Short URL in the toolbar

Drag this link: (JavaScript link) to your browser toolbar. From now on, to generate a short URL from the page currently viewed in the browser, just click the link in the toolbar.

dandanio avatar Sep 24 '22 12:09 dandanio

Oooh interesting! You mean like a Chrome Extension?

I don't think there is a need for a full blown extension, unless you add some other functionality that is unique and nesesitates an extension.

dandanio avatar Sep 24 '22 12:09 dandanio

We can create a extension with features like searching for the url directly in the search bar or some other features included. Happy to assist and help in building.

b4s36t4 avatar Sep 26 '22 14:09 b4s36t4

Interested in picking this up when I get time next :D (maybe in a week, we'll see). Seems like it'll be fun to work on.

itsmingjie avatar Oct 02 '22 01:10 itsmingjie