-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d5ae16a
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
content vstab ./ | ||
overlay chrome://browser/content/browser.xul chrome://vstab/content/vstab.xul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> | ||
<Description about="urn:mozilla:install-manifest"> | ||
<em:id>vstab@Off.JustOff</em:id> | ||
<em:name>View Source In Tab</em:name> | ||
<em:version>1.0.2</em:version> | ||
<em:description>View Source in Tab</em:description> | ||
<em:creator>JustOff</em:creator> | ||
<em:contributor>Brian King</em:contributor> | ||
<em:contributor>WYSIWYG Classic Icons by dryicons (http://dryicons.com/)</em:contributor> | ||
<em:updateURL>https://localhost/update.xml</em:updateURL> | ||
|
||
<em:targetApplication> | ||
<Description> | ||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> | ||
<em:minVersion>24.0</em:minVersion> | ||
<em:maxVersion>*</em:maxVersion> | ||
</Description> | ||
</em:targetApplication> | ||
<em:targetApplication> | ||
<Description> | ||
<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id> | ||
<em:minVersion>24.0</em:minVersion> | ||
<em:maxVersion>*</em:maxVersion> | ||
</Description> | ||
</em:targetApplication> | ||
</Description> | ||
</RDF> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var vstabClass = | ||
{ | ||
InterceptVS: function () | ||
{ | ||
var page = content.location.href; | ||
var ioService = Components.classes["@mozilla.org/network/io-service;1"] | ||
.getService(Components.interfaces.nsIIOService); | ||
var uri = ioService.newURI(page, null, null); | ||
var proto = uri.scheme; | ||
|
||
if (proto != "view-source") { | ||
openUILinkIn("view-source:"+uri.spec, "tab"); | ||
} | ||
}, | ||
|
||
BrowserViewSourceOfDocument: function (aDocument) | ||
{ | ||
openUILinkIn("view-source:"+aDocument.location.href, "tab"); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE overlay [ | ||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" > | ||
%browserDTD; | ||
]> | ||
|
||
<overlay id="vstabOverlay" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:nc="http://home.netscape.com/NC-rdf#" | ||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
|
||
<script type="application/x-javascript" src="chrome://vstab/content/vstab.js"/> | ||
|
||
<stringbundleset id="stringbundleset"> | ||
<stringbundle id="viewSourceBundle" src="chrome://global/locale/viewSource.properties"/> | ||
</stringbundleset> | ||
|
||
<commandset id="mainCommandSet"> | ||
<command id="View:PageSource" oncommand="vstabClass.InterceptVS();" observes="isImage"/> | ||
</commandset> | ||
|
||
<popup id="contentAreaContextMenu"> | ||
<menuitem id="context-viewsource" | ||
insertbefore="context-viewinfo" | ||
label="&viewPageSourceCmd.label;" | ||
accesskey="" | ||
oncommand="vstabClass.BrowserViewSourceOfDocument(content.document);"/> | ||
</popup> | ||
</overlay> |