4
<?xml-stylesheet href="chrome://aios/skin/viewsource.css"?>
5
<?xml-stylesheet href="chrome://aios/skin/_sbmanager.css"?>
9
<!ENTITY % aiosDTD SYSTEM "chrome://aios/locale/lib.dtd"> %aiosDTD;
12
<overlay id="viewSourceOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
15
<script type="application/x-javascript" src="chrome://aios/content/_common.js" />
16
<script type="application/x-javascript" src="chrome://aios/content/viewsource.js" />
20
if(top.document.getElementById('sidebar') || top.toString() == "[object Window]") {
22
window.addEventListener("load", aios_init, false);
24
var tab = (top.toString() == "[object Window]") ? true : false;
26
// im Tab vorlauefig nur den Quelltext anzeigen
28
var loc = "view-source:" + aios_WIN.aiosLastSelTab.document.location.href;
29
aios_CONTENT.webNavigation.loadURI(loc, null, null, null, null);
32
// aus dem <browser> ein normales Element ohne 'content-primary' machen
33
document.getElementById('content').setAttribute('type', 'content');
35
// Status-Leiste unsichtbar
36
if(document.getElementById('status-bar')) document.getElementById('status-bar').hidden = true;
38
// Funktionen modifizieren, um die URL aus dem Browser anstatt einem übergebenem Argument zu entnehmen, ...
39
onLoadViewSource = function() {
40
// viewSource(window.arguments[0]); // Firefox-Variante f. Fenster
42
document.commandDispatcher.focusedWindow = content;
43
if(typeof initFindBar != "undefined") initFindBar();
46
// ... und um den 'content' korrekt aus der Sidebar heraus anzusprechen, ...
47
eval(aios_replaceString(viewSource));
48
eval(aios_replaceString(onLoadContent));
49
eval(aios_replaceString(goToLine));
50
eval(aios_replaceString(updateStatusBar));
51
eval(aios_replaceString(findLocation));
52
eval(aios_replaceString(wrapLongLines));
54
// ... und um die richtigen URLs zum Editieren und Speichern zu verwenden
55
ViewSourceEditPage = function() {
56
// editPage(window.content.location.href.substring(12), window, false); // Firefox-Variante f. Fenster
57
if(tab && aios_WIN.aiosLastSelTab) editPage(aios_WIN.aiosLastSelTab.location.href, window, false);
58
else editPage(window.content.location.href, window, false);
60
ViewSourceSavePage = function() {
61
// saveURL(window.content.location.href.substring(12), null, "SaveLinkTitle"); // Firefox-Variante f. Fenster
62
if(tab && aios_WIN.aiosLastSelTab) saveURL(window.content.location.href, null, "SaveLinkTitle");
63
else saveURL(aios_WIN.aiosLastSelTab.location.href, null, "SaveLinkTitle");
66
// Listener für automatische Aktualisierung hinzufügen u. entfernen
68
window.addEventListener("load", function(e) {
69
if(top.gBrowser.addProgressListener) top.gBrowser.addProgressListener(aiosProgListener, Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
72
window.addEventListener("unload",function(e) {
73
if(top.gBrowser.removeProgressListener) top.gBrowser.removeProgressListener(aiosProgListener);
82
<menubar id="viewSource-main-menubar">
84
<toolbarbutton id="reload-button" class="toolbarbutton-1" type="menu-button" oncommand="aios_viewSource();"
85
label="&refresh.label;" tooltiptext="&refresh.label;" position="1">
88
<menuitem id="autoReload-mitem" type="checkbox" checked="true" autocheck="false" persist="checked"
89
label="&refresh.auto.label;" tooltiptext="&refresh.auto.tooltip;"
90
oncommand="aios_toggleElement(this); aios_onLocationChange(); event.stopPropagation();" />
95
<toolbarseparator id="toolbar-sep" position="2" />
99
<menuitem id="menu_highlightSyntax" onmouseup="aios_viewSource();" />
b'\\ No newline at end of file'