How do I view the source code of a web page?
-
alexisadvance last edited by
In old versions of Opera for Android I could see the source code of a web page by prefixing "view-source:" in the address bar (for example: view-source:https://www.opera.com), but now this feature does not work anymore (at least for me). I need to know how I can do this now. My Opera version is 35.0.2070.100283.
Thanks!!
-
alexisadvance last edited by
Nobody has an answer for this?
Please, I need a solution, or at least a reason for why this feature was eliminated.
-
custdemotest last edited by
javascript:var n=document.firstChild;while(n && n.nodeType!=Node.ELEMENT_NODE) n=n.nextSibling;document.write('
' + n.outerHTML.replace(/&/g, '&').replace(/</g, '<font color=\'#aa6600\'><').replace(/>/g, '></font>'));
-
custdemotest last edited by
javascript:var n=document.firstChild;while(n && n.nodeType!=Node.ELEMENT_NODE) n=n.nextSibling;document.write('
' + n.outerHTML.replace(/&/g, '&').replace(/</g, '<font color=\'#aa6600\'><').replace(/>/g, '></font>')); It's . < PRE >. between lines, check edit mode.
-
custdemotest last edited by
javascript:var n=document.firstChild;while(n && n.nodeType!=Node.ELEMENT_NODE) n=n.nextSibling;document.write('
' + n.outerHTML.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')); > > ā
-
custdemotest last edited by
Doesn't work. < p r e > (without space) is blank in this forum, that must be in right after write('
-
alexisadvance last edited by
I do not understand your comments. What is that JS file for? I just need to view a website source code in opera for Android.
-
alexisadvance last edited by
OK, now I understood your comment. This JS code is for use in the address bar. Thanks!
But, why is it no longer possible to see the source from the "view-source:" prefix? Having to run a JS code is not a good choice.
Hopefully some Opera developer answered me...