PDA

View Full Version : Possibility of a "copy thread url script to clipboard" feature?


Lobsang
10-04-2009, 05:51 PM
As most of you know, something that happens a LOT on the dope is people referencing threads from other threads.

Unless I'm missing a trick the process is quite complicated...

Right click on the straight dope message board link or the forum link near the top of the page.

Click 'open in new tab' or 'open in new window'.

Go to the thread you want to quote.

Copy its link.

Go back to the thread you're creating.

Paste link.

Go back (again) to the thread you're linking to.

Copy the name of the thread.

Go back to your post.

Paste it into the appropriate part of the url tag.


[whew!]


So I reckon it'd be a lot better if you could go to the thread in question. Click a button near it's title that says 'copy url script to clipboard' and this would then generate the url script, with the url in the url part and the name of the thread in the name part, copy it to your clipboard (or to a box where you could ctrl-c it.


I doubt this would be easy or possible, but an interesting idea yes?

rowrrbazzle
10-04-2009, 06:56 PM
There's already a feature that does this.

Navigate to the post in another thread you want to copy.

Just to the right of its "quote" button is a button containing double close quotes. Click on that.

Then go back to the thread you want to post in. You now have two choices. Either a) compose your post in the quick reply box, then click "go advanced" to bring up a preview and the standard reply page; or b) click on "post reply" to bring up the standard reply page and compose your post.

Just below the input area will be the message "You have selected 1 post that is not part of this thread. Quote this post as well, or deselect this post." Click on "quote this post as well" and voilą!

Covered_In_Bees!
10-04-2009, 08:22 PM
If you have FireFox you can right-click and "copy link location". It cuts out the step of having to view the thread to steal the URL from the navigation bar or whatever it's called at the top.

So I hope that helps and that I didn't misunderstand your post.

Lobsang
10-04-2009, 08:24 PM
I think you misunderstand. [ETA: Not you Coverd_In_Bees!, the person above you. your post came in as I was typing mine] I'm not looking to quote the thread (not post). I'm looking to create a link to it.

Such as...

"Inspired by Name of thread goes here (http://url of thread goes here) "


ETA Again: Coverd_In_Bees! that helps a bit (In fact sometimes it's what I do) But I still need some of those steps. I need to be on the forum page to be able to do that firefox trick, and I need to keep the post open as a place to cut and paste (and because I've already begun it. I'm not a good planner)

QuercusMax
10-04-2009, 08:48 PM
Well, I had 99% of a Javascript bookmarklet (http://en.wikipedia.org/wiki/Bookmarklet) to do this written, except for one crucial thing - most browsers don't let you copy to clipboard thru Javascript.

I found a library called ZeroClipboard (http://code.google.com/p/zeroclipboard/) that will let you do this thru a horrible hack (using Flash to do the copying), but it seems like massive overkill.

This seems like a nice compromise: just make a new bookmark with the code below in to your bookmark toolbar, and go hog wild. :)

javascript:{var%20title%20=%20document.title.replace(/%20-%20Straight%20Dope%20Message%20Board/,%20'');%20var%20loc=document.location;%20tag%20=%20''%20+%20title%20+%20' ('%20+%20loc%20+%20')';%20%20w%20=%20window.open('',%20'Copy%20Me!',%20'width=300,%20height=300');%2 0w.document.body.innerHTML%20=%20'<h1>Test</h1>'%20+%20tag;}

This will pop up a little window that you can copy the link out of. Not great, but better than nothing.

Disclaimer: this is the first bookmarklet I've ever written. So don't blame me if it shaves your dog or sleeps with your sister.

QuercusMax
10-04-2009, 08:55 PM
Well, that didn't work because the hamsters thought my javascript looked like a url tag. Try this instead:

javascript:{var title = document.title.replace(/ - Straight Dope Message Board/, ''); var loc=document.location; tag = '[UR' + 'L="' + loc + '"]' + title + '[/URL]'; w = window.open('', 'Copy Me!', 'width=300, height=300'); w.document.body.innerHTML = tag;}

Lobsang
10-05-2009, 11:03 AM
Well, that didn't work because the hamsters thought my javascript looked like a url tag. Try this instead:

javascript:{var title = document.title.replace(/ - Straight Dope Message Board/, ''); var loc=document.location; tag = '[UR' + 'L="' + loc + '"]' + title + '[/URL]'; w = window.open('', 'Copy Me!', 'width=300, height=300'); w.document.body.innerHTML = tag;}


Dude! It works!...

Possibility of a "copy thread url script to clipboard" feature? (http://boards.straightdope.com/sdmb/showthread.php?p=11628127#post11628127)

If there's anything I can do for you in return. :)

QuercusMax
10-05-2009, 11:07 AM
Dude! It works!...

Possibility of a "copy thread url script to clipboard" feature? (http://boards.straightdope.com/sdmb/showthread.php?p=11628127#post11628127)

If there's anything I can do for you in return. :)

You're welcome! I have a couple more ideas for how to improve it - I might post them tonight. I think i can make a text-entry field that will have the text pre-selected, so you can just hit ctrl-C to copy. Also, it should be pretty easy to strip off any &page= and #post's from the end of the URL, if you just want to go to the beginning of the thread.

Lobsang
10-05-2009, 11:26 AM
I would almost always just want the thread, so for my purposes it does the job.

Chronos
10-05-2009, 12:00 PM
How is this any simpler than clicking in the address bar, right-clicking, and selecting "copy"?

Lobsang
10-05-2009, 12:25 PM
How is this any simpler than clicking in the address bar, right-clicking, and selecting "copy"?


(Sigh)

That doesn't get the thread's name.

ETA: It's a LOT SIMPLER!

Lobsang
10-05-2009, 12:43 PM
Whoops. Wrong thread.

fubbleskag
10-05-2009, 01:02 PM
How is this any simpler than clicking in the address bar, right-clicking, and selecting "copy"?

it's specifically for making the VBulletin code for urls within a post, ie.

Thread Title Goes Here

rowrrbazzle
10-05-2009, 02:57 PM
:smack:

Sorry, I've been a bit short on sleep.

Chronos
10-05-2009, 03:56 PM
Oh, I get it now.

Lobsang
10-05-2009, 04:42 PM
No worries.

It seems to work quite well for other websites...

BBC NEWS | Politics | Freeze top public pay - Darling (http://news.bbc.co.uk/1/hi/uk_politics/8291810.stm)