Showing source in Firefox

Annoyed that Firefox pops up the source of a page in a separate window when you View Source? Annoyed that Epiphany shows the source of a page in Gedit? Help is at hand! Simply drag the following link to your bookmarklet bar:

Toggle source

Clicking it will replace the page you’re viewing with that page’s source, nicely syntax-highlighted, in the same browser tab. Clicking it again will go back to the page. That should keep Sean Middleditch happy and stop complaints about Epiphany using Gedit as an HTML viewer.

(Warning: I don’t know what happens if you do this on a page where you’ve just posted some data, like if you’ve just placed an Amazon order or something. Don’t do that.)

13 comments.

  1. If gedit didn’t take longer than firefox to cold start, maybe that would be even better. :)

    As nice as this is, it only solves a tiny part of the problem for an even tinier part of the users.

  2. Stoffe: which problem do you think it was trying to solve?

  3. Cool… now we just need a Dreamweaver-like split view in Epiphany, where the selection in the code view is mirrored in the in the HTML view, and vice versa :)

  4. Excellent – thanks!!

  5. very usefull thanks :)

  6. great tip, thanks

  7. I’ve been using an extension for epiphany for this ;)

  8. I hope this isn’t a stupid question – I’ve asked all over the net…

    Is there a way I can get Firefox (via a settling in about:config maybe?) to display absolute paths in view source?

    View source sometimes doesn’t show the absolute path of links.

    wikipedia for example
    http://en.wikipedia.org/wiki/Main_Page

  9. By the way – “Post comment and follow comments in your feed reader” – brilliant.

  10. ekbworldwide: as far as I’m aware, you’d need an extension to make Firefox show full paths. Bear in mind that that would make “View Source” stop actually viewing the source, which makes it pretty unreliable, so I doubt that Firefox could do it. It could be done with JavaScript, too, if you could get the JavaScript to run in a view-source window.

  11. I should have said “copy absolute paths”.

    Anyway…

    If you’re curious (or if anybody is) – I started a thread about it at userscripts.org

    Fixing the “copy and paste” relative path problem – Userscripts.org
    http://userscripts.org/forums/2/topics/1436

  12. Thanks, that just solved this irksome problem I have been having with epiphany opening up a freaking spreadsheet to view the source – what’s up with that?

  13. [...] to see the HTML source for Wikipedia’s front page. The solution was presented over at Stuart Langridge’s blog where he also presents a simple bookmarklet for swapping source view on and off in the current [...]

Post a comment.