From 1062e53bfc108e92d689cdc413c1f4133594a683 Mon Sep 17 00:00:00 2001 From: piro Date: Mon, 22 Oct 2007 23:29:07 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=BD?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E3=82=92=E3=82=BF=E3=83=96=E3=81=A7=E9=96=8B?= =?UTF-8?q?=E3=81=8F=E6=A9=9F=E8=83=BD=E3=81=AE=E5=AE=9F=E8=A3=85=E3=82=92?= =?UTF-8?q?=E9=96=8B=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1292 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- chrome.manifest | 1 + content/treestyletab/treestyletab.js | 89 +++++++++++++++++++++- content/treestyletab/viewSourceOverlay.xul | 65 ++++++++++++++++ defaults/preferences/treestyletab.js | 1 + 4 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 content/treestyletab/viewSourceOverlay.xul diff --git a/chrome.manifest b/chrome.manifest index c51e6b3e..96ca3225 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -1,6 +1,7 @@ content treestyletab jar:chrome/treestyletab.jar!/content/treestyletab/ overlay chrome://browser/content/browser.xul chrome://treestyletab/content/treestyletab.xul +overlay chrome://global/content/viewSource.xul chrome://treestyletab/content/viewSourceOverlay.xul overlay chrome://multipletab/content/config.xul chrome://treestyletab/content/multipletabConfigOverlay.xul locale treestyletab en-US jar:chrome/treestyletab.jar!/locale/en-US/treestyletab/ diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index ac6aa21b..e7d1adc7 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -800,6 +800,69 @@ catch(e) { openUILinkIn(]]> ) ); + eval('nsContextMenu.prototype.viewPartialSource = '+ + nsContextMenu.prototype.viewPartialSource.toSource().replace( + 'window.openDialog(', + <> + ) + ); + eval('nsContextMenu.prototype.viewFrameSource = '+ + nsContextMenu.prototype.viewFrameSource.toSource().replace( + '{', + <> + ) + ); + eval('window.BrowserViewSourceOfDocument = '+ + window.BrowserViewSourceOfDocument.toSource().replace( + 'ViewSourceOfURL(', + <> + ) + ); + eval('window.ViewSourceOfURL = '+ + window.ViewSourceOfURL.toSource().replace( + 'gViewSourceUtils.openInExternalEditor(', + <> + ) + ); + eval('gViewSourceUtils.openInInternalViewer = '+ + gViewSourceUtils.openInInternalViewer.toSource().replace( + /(openDialog\([^\)]+\))/, + <> + ) + ); funcs = 'handleLinkClick __splitbrowser__handleLinkClick __ctxextensions__handleLinkClick'.split(' '); for (var i in funcs) @@ -839,8 +902,8 @@ catch(e) { ) ); - eval('window.nsBrowserAccess.prototype.openURI = '+ - window.nsBrowserAccess.prototype.openURI.toSource().replace( + eval('nsBrowserAccess.prototype.openURI = '+ + nsBrowserAccess.prototype.openURI.toSource().replace( /switch\s*\(aWhere\)/, <> + + + + + diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js index 4d60bf78..e139bfe3 100644 --- a/defaults/preferences/treestyletab.js +++ b/defaults/preferences/treestyletab.js @@ -11,6 +11,7 @@ pref("extensions.treestyletab.show.openSelectionLinks", true); pref("extensions.treestyletab.openGroupBookmarkAsTabSubTree", true); pref("extensions.treestyletab.loadDroppedLinkToNewChildTab", false); +pref("extensions.treestyletab.viewSourceInTab", true); pref("extensions.treestyletab.autoCollapseExpandSubTreeOnSelect", true); pref("extensions.treestyletab.collapseExpandSubTree.dblclick", false);