Enhanced Copy for Opera - Copy URL, Title & Selection
Friday, 11. January 2008, 05:40:06
Firefox has a niche addon called "CopyURL+", which enables you to copy URL+PageTitle, URL+Selection, URL+Selection+PageTitle, etc. Well, I want that on Opera.
Yaske made opera_ex (link Japanese) a small Windows application that does exactly that (and more apparently), which you can call as an external program from Opera.
Later, higeorange rewrote it for Linux (Gtk2-Perl version & Ruby-Gnome version).
Both links are in Japanese. I could translate them if on high demand, but I don't think it's needed. Here is a sort-of description: opera_ex on Linux
Anyway, I'm neither on Windows nor Linux, and I don't want to use an external program for Opera. I want a browser to be stand alone.
Owing to the "Delay" action introduced at Opera9.50beta, it is now possible to copy URL+PageTitle+Selection and so on using Opera internal actions and JavaScript.
Here is how you do.
If you want to copy with a format like this,
Write this for your keyboard shortcut or rightclick menu.
If you want an myOpera blog style like,
Then add this to your shortcut
Or you can create your own.
What they are doing is, call JavaScript alert, paste URL etc. with the format, Delay, Copy and Close the alert. Without Delay this doesn't work (which means it doesn't work on Opera9.25 or before, so you have to copy and close the alert by hand if you really want).
The only thing that might bother you is that it brings up an alert for a little moment and erases. I first didn't like it, but now I don't mind. I even like it because it tells me I am copying what I want for sure.
Yaske made opera_ex (link Japanese) a small Windows application that does exactly that (and more apparently), which you can call as an external program from Opera.
Later, higeorange rewrote it for Linux (Gtk2-Perl version & Ruby-Gnome version).
Both links are in Japanese. I could translate them if on high demand, but I don't think it's needed. Here is a sort-of description: opera_ex on Linux
Anyway, I'm neither on Windows nor Linux, and I don't want to use an external program for Opera. I want a browser to be stand alone.
Owing to the "Delay" action introduced at Opera9.50beta, it is now possible to copy URL+PageTitle+Selection and so on using Opera internal actions and JavaScript.
Here is how you do.
If you want to copy with a format like this,
<p>SelectedText<a href="URL">PageTitle</a></p>
Write this for your keyboard shortcut or rightclick menu.
Go to page, "javascript:window.prompt('','<p>'+window.getSelection()+'<a href=\x22'+location.href+'\x22>'+document.title+'</a></p>');" & Delay, 10 & Copy & Cancel
If you want an myOpera blog style like,
[URL=URL]PageTitle[/URL]*LineBreak* SelectedText(if exists)
Then add this to your shortcut
Go to page, "javascript:var s=window.getSelection(),t='[URL='+location.href+']'+document.title+'[/URL]',t=s?t+'\r\n'+s:t;window.prompt('',t);" & Delay, 10 & Copy & Cancel
Or you can create your own.
What they are doing is, call JavaScript alert, paste URL etc. with the format, Delay, Copy and Close the alert. Without Delay this doesn't work (which means it doesn't work on Opera9.25 or before, so you have to copy and close the alert by hand if you really want).
The only thing that might bother you is that it brings up an alert for a little moment and erases. I first didn't like it, but now I don't mind. I even like it because it tells me I am copying what I want for sure.














