View Source Choice v0.1

I was reading this post the other day, and when I read “…I’m looking for a way to keep the original site in a tab and open the source in an adjacent tab”. Ding! The lightbulb went off in my head, and I said it should not be too hard to do. So yesterday I coded up a quick and dirty version of View Source Choice. Minimal features currently, but I’ll expand on it.

DOWNLOAD v0.1

Requirements

  • Firefox 1.5. I will not support earlier versions, but will later versions when the time comes.

Features

  • Handle View Source requests that come in through the view-source: protocol.
  • Turn extension on and off in Options
  • Redirect View Source to current window (current default in Firefox), new tab, or new window.

Planned Features

(v0.2 and beyond)

  • Load Source in Sidebar. You can see this in action in the excellent All-In-One Sidebar extension.
  • Load Source in external application. The ViewSourceWith extension has this functionality.
  • Add sub-menu to browser context menu with full list of choices to load Source.
  • Override the View->Page Source (Ctrl+U) item, at least as an option. Currently this opens the Source in a special window.

9 Responses to “View Source Choice v0.1”

  1. Deacon Nikolai 4-Dec-2005 at 08:33 #

    How does this differ from the functionality already in the Web Developer extension if you choose preferences when viewing your extersions! :-)

    In Christ,
    Deacon Nikolai
    http://Stanosheck.com

  2. Deacon Nikolai 4-Dec-2005 at 08:34 #

    extensions even! LOL!

  3. Minh Nguyá»…n 4-Dec-2005 at 09:25 #

    It’d be nice if this extension could provide a separate View Tabs widget at the bottom of the viewport to switch between the Normal and View Source views, like in Composer and Nvu. This way the normal tab bar doesn’t get too crowded when you’re trying to view the sources of several pages and see how they look in Normal view. Maybe it’s even possible to develop a Print Preview tab for this extension. You’d have to find a good keyboard shortcut for this extra tab bar, though.

  4. Boris 4-Dec-2005 at 17:25 #

    Brian, the “special window” has a lot of view-source specific UI that’s been worked on quite a bit. Do you plan to duplicate that UI for all Firefox windows?

  5. brian 4-Dec-2005 at 18:29 #

    Deacon: I was not aware it was in Web Developer, but I guess this differs in that it (plans to) offer more features for viewing source.

    Minh: I like your idea about the extra tabs at bottom (or elsewhere) for switching between normal and source view. It would mean more tabs clutter, unless some other UI paradigm was chosen. But it would give finer grained control for each page.

    Boris: It seems all the features in the special window are available in the browser window anyway. What in particular are you referring to?

Trackbacks/Pingbacks

  1. Blogzilla - a weblog about Mozilla - 4-Dec-2005

    View Source Choice

    In response to an entry discussing view source in Firefox, Brian King created the View Source Choice extension with the exact feature we were looking for. The ability to: [r]edirect View Source to current window (current default in Firefox), new tab, o…

  2. a.css, esbudellant estàndards » Extensió: View Source Choise - 7-Dec-2005

    [...] View Source Choise [...]

  3. No Title » Blog Archive » View Source in Tab - 11-Dec-2005

    [...] View Source Choice by Brian King. Only handles the view-source: protocol. Type view-source: and the page URL on location bar. Example: view-source:http://foo.com/bar.html [...]

  4. Pogovor » View Source Choice v0.2 - 6-Jan-2006

    [...] Following the positive response to v0.1, here is the next iteration of this extension. New in this version is the ability to override the ‘View->Page Source’ menu item (Ctrl+U). It doesn’t override the key or the menu item, but rather the page source command. So it should still work if you have customised those items using an extension like keyconfig or menueditor. Another new feature is to open the source in the View Source window. [...]

Leave a Reply