Loading xpfe/communicator/resources/content/contentAreaContextOverlay.xul +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ label="&openLinkCmd.label;" accesskey="&openLinkCmd.accesskey;" oncommand="gContextMenu.openLink();"/> <menuitem id="context-openlinkintab" label="&openLinkCmdInTab.label;" accesskey="&openLinkCmdInTab.accesskey;" oncommand="gContextMenu.openLinkInTab();"/> <!-- XXX - DEPENDENT ON PRESENCE OF EDITOR!! - XXX --> <menuitem id="context-editlink" label="&editLinkCmd.label;" Loading xpfe/communicator/resources/content/contentAreaUtils.js +17 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,23 @@ newWin.saveFileAndPos = true; } function openNewTabWith(url) { urlSecurityCheck(url, document); var wintype = document.firstChild.getAttribute('windowtype'); // if and only if the current window is a browser window and it has a document with a character // set, then extract the current charset menu setting from the current document and use it to // initialize the new browser window... if (window && (wintype == "navigator:browser")) { var browser=getBrowser(); browser.selectedTab = browser.addTab(url); } // Fix new window. newWin.saveFileAndPos = true; } function savePage(url) { var postData = null; // No post data, usually. Loading xpfe/communicator/resources/content/nsContextMenu.js +6 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ nsContextMenu.prototype = { initOpenItems : function () { // Remove open/edit link if not applicable. this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-openlinkintab", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-editlink", this.onSaveableLink && !this.inDirList ); // Remove open frame if not applicable. Loading Loading @@ -427,6 +428,11 @@ nsContextMenu.prototype = { // Determine linked-to URL. openNewWindowWith( this.linkURL() ); }, // Open linked-to URL in a new tab. openLinkInTab : function () { // Determine linked-to URL. openNewTabWith( this.linkURL() ); }, // Edit linked-to URL in a new window. editLink : function () { urlSecurityCheck( this.linkURL(), window.document ); Loading xpfe/communicator/resources/locale/en-US/contentAreaCommands.dtd +3 −1 Original line number Diff line number Diff line <!-- Context Menu --> <!ENTITY openLinkCmd.label "Open in New Window"> <!ENTITY openLinkCmd.accesskey "o"> <!ENTITY openLinkCmdInTab.label "Open in New Tab"> <!ENTITY openLinkCmdInTab.accesskey "t"> <!ENTITY openLinkInWindowCmd.label "Open"> <!ENTITY openLinkInWindowCmd.accesskey "p"> <!ENTITY editLinkCmd.label "Edit Link in Composer"> Loading Loading
xpfe/communicator/resources/content/contentAreaContextOverlay.xul +4 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,10 @@ label="&openLinkCmd.label;" accesskey="&openLinkCmd.accesskey;" oncommand="gContextMenu.openLink();"/> <menuitem id="context-openlinkintab" label="&openLinkCmdInTab.label;" accesskey="&openLinkCmdInTab.accesskey;" oncommand="gContextMenu.openLinkInTab();"/> <!-- XXX - DEPENDENT ON PRESENCE OF EDITOR!! - XXX --> <menuitem id="context-editlink" label="&editLinkCmd.label;" Loading
xpfe/communicator/resources/content/contentAreaUtils.js +17 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,23 @@ newWin.saveFileAndPos = true; } function openNewTabWith(url) { urlSecurityCheck(url, document); var wintype = document.firstChild.getAttribute('windowtype'); // if and only if the current window is a browser window and it has a document with a character // set, then extract the current charset menu setting from the current document and use it to // initialize the new browser window... if (window && (wintype == "navigator:browser")) { var browser=getBrowser(); browser.selectedTab = browser.addTab(url); } // Fix new window. newWin.saveFileAndPos = true; } function savePage(url) { var postData = null; // No post data, usually. Loading
xpfe/communicator/resources/content/nsContextMenu.js +6 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ nsContextMenu.prototype = { initOpenItems : function () { // Remove open/edit link if not applicable. this.showItem( "context-openlink", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-openlinkintab", this.onSaveableLink || ( this.inDirList && this.onLink ) ); this.showItem( "context-editlink", this.onSaveableLink && !this.inDirList ); // Remove open frame if not applicable. Loading Loading @@ -427,6 +428,11 @@ nsContextMenu.prototype = { // Determine linked-to URL. openNewWindowWith( this.linkURL() ); }, // Open linked-to URL in a new tab. openLinkInTab : function () { // Determine linked-to URL. openNewTabWith( this.linkURL() ); }, // Edit linked-to URL in a new window. editLink : function () { urlSecurityCheck( this.linkURL(), window.document ); Loading
xpfe/communicator/resources/locale/en-US/contentAreaCommands.dtd +3 −1 Original line number Diff line number Diff line <!-- Context Menu --> <!ENTITY openLinkCmd.label "Open in New Window"> <!ENTITY openLinkCmd.accesskey "o"> <!ENTITY openLinkCmdInTab.label "Open in New Tab"> <!ENTITY openLinkCmdInTab.accesskey "t"> <!ENTITY openLinkInWindowCmd.label "Open"> <!ENTITY openLinkInWindowCmd.accesskey "p"> <!ENTITY editLinkCmd.label "Edit Link in Composer"> Loading