All Unkept
Posted in: KDE  —  4 May 2006

View Source in Konqueror

I found a quick way of doing 'View Source' in Konqueror. The built-in way opens your text editor, which isn't instant in my case (I have it configured to use Kate, which is great if I'm actually going to edit something, but usually I just want a quick peek, and I want it to be instant).

The trick is to use the following bookmarklet:

javascript:void (function(){c=unescape(document.documentElement.innerHTML); c=c.replace(/&/g,'&amp;'); c=c.replace(/</g,'&lt;'); c=c.replace(/>/g,'&gt;'); x=window.open('');x.document.write('<html><head><title>Source of Page<\/title><\/head><body bgcolor=\'#ffffcc\'><pre>' + c + '\n<\/pre><\/body><\/html>');x.document.close();return false;})();

You can use bookmarklets in Konqueror via 'Minitools' -- it's quick and convenient, but so badly documented that I only just found out about it. The pages source is opened in a new window.

Comments §

No comments.

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.