View Source in New Tab for Firefox
Extension discovered - View Source Choice
I have for the longest time wished I could have Firefox open the 'View Source' dialog in a new tab instead of a new window. There are extensions that include this functionality, but no lightweight ones. Most of them add a bunch of tab functionality that either I don't need, or is built right into Firefox. I have now found a possible solution. Prefixing 'view-source:' to any URL in the Firefox address bar will open the 'View Source' dialog for that URL in the current tab. For example, this link will bring up the source for this page. Using this information it should be simple enough to create a Firefox extension that overrides the View > Page Source menu item and the Ctrl+U shortcut key to open the source code for the current page in a new tab.
I have for the longest time wished I could have Firefox open the 'View Source' dialog in a new tab instead of a new window. There are extensions that include this functionality, but no lightweight ones. Most of them add a bunch of tab functionality that either I don't need, or is built right into Firefox. I have now found a possible solution. Prefixing 'view-source:' to any URL in the Firefox address bar will open the 'View Source' dialog for that URL in the current tab. For example, this link will bring up the source for this page. Using this information it should be simple enough to create a Firefox extension that overrides the View > Page Source menu item and the Ctrl+U shortcut key to open the source code for the current page in a new tab.
"There are extensions that include this functionality, but no lightweight ones."
You can try Open Source in Tab or View Source in Tab.
View Source in Tab is close, but no cigar. Open source in tab adds an extra menu item you have to use, which is not at all conveniant. View Source in tab uses the default items, but only on middle-click, and the hotkey is untouched... maybe a mod of these extensions though...
Cool idea. I've been looking for something that did this for a while. I wrote a quick bookmarklet based on what you said.
Past this into a book mark and put it on your bookmark tool bar:javascript:myWin = window.open(window.location.href);history.go(-1);myWin.location = 'view-source:'+window.location.href;history.go(-1);
I'm going to use this all the time now. Thanks!
Why not simplify that Javascript even further?
javascript:void(window.open('view-source:'+window.location.href));
Works for me.
The javascript at the end is perfect. Thanks so much for this super simple bookmarklet!
Try this light weight plugin..
https://addons.mozilla.org/en-US/firefox/addon/tabbed-view-source/