Copy selection source

in
Copies the generated source from a web page.

Updated version for the new HTML5 parser in 11.60:

Item, "Copy selection source" = Go to page,"javascript:var html_selection=document.createElement('div');html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents());document.open('application/xhtml+xml');document.write(html_selection.innerHTML);document.close();",0 & delay,200 & Select all & Copy & back 

Version for 11.50 and lower:

Item, "Copy selection source " = Go to page,"javascript:var html_selection=document.createElement('div');html_selection.appendChild(window.getSelection().getRangeAt(0).cloneContents());document.write('<!DOCTYPE html><pre><![CDATA['+html_selection.innerHTML+']]></pre>');",0 & delay,200 & Select all & Copy & back
Installation Instructions: 

As shown this can go straight into a custom menu.ini, but of course you can do anything you like.

Changelog

20-11-2011

Updated for the new HTML5 parser.

Syndicate content

Tested with Opera version(s): 
11
11.10
11.11
11.5x
12.0
Your rating: None Average: 2.2 (13 votes)