зеркало из https://github.com/mozilla/pjs.git
bug 305972.
This commit is contained in:
Родитель
218b49e712
Коммит
c49d13d532
|
@ -429,6 +429,9 @@ function BrowserReload()
|
|||
getWebNavigation().reload(nsIWebNavigation.LOAD_FLAGS_NONE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Combine the two following functions in one
|
||||
*/
|
||||
function BrowserOpenTab()
|
||||
{
|
||||
try {
|
||||
|
@ -441,6 +444,21 @@ function BrowserOpenTab()
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* Used by the Context Menu - Open link as Tab
|
||||
*/
|
||||
function BrowserOpenLinkAsTab()
|
||||
{
|
||||
if(document.commandDispatcher.focusedElement.href) {
|
||||
try {
|
||||
getBrowser().selectedTab = getBrowser().addTab(document.commandDispatcher.focusedElement.href);
|
||||
browserInit(getBrowser().selectedTab);
|
||||
} catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* FOR - keyboard acessibility - context menu for tabbed area ***
|
||||
* Launches the popup for the tabbed area / tabbrowser. Make sure to call this function
|
||||
|
@ -515,6 +533,16 @@ function BrowserUIResetZoomMinus() {
|
|||
thus mutate the popup menu to the right make call item
|
||||
*/
|
||||
function BrowserPopupShowing () {
|
||||
|
||||
/*
|
||||
* Open Link as New Tab
|
||||
*/
|
||||
if(document.commandDispatcher.focusedElement && document.commandDispatcher.focusedElement.href) {
|
||||
document.getElementById("link_as_new_tab").hidden=false;
|
||||
} else {
|
||||
document.getElementById("link_as_new_tab").hidden=true;
|
||||
}
|
||||
|
||||
var selectedRange=getBrowser().selectedBrowser.contentDocument.getSelection();
|
||||
document.getElementById("item-call").label="Call \""+ selectedRange + " \"";
|
||||
document.getElementById("item-call").setAttribute("oncommand","DoTestSendCall("+selectedRange+")");
|
||||
|
|
|
@ -205,10 +205,12 @@
|
|||
<toolbarbutton class="reload-button" command="cmd_BrowserReload"/>
|
||||
</toolbar>
|
||||
|
||||
<menuitem id="link_as_new_tab" label="Open link as New Tab" oncommand="BrowserOpenLinkAsTab()" hidden="true"/>
|
||||
<menuitem id="item-call" label="" insertbefore="context-sep-view" oncommand=""/>
|
||||
<menuitem id="full_screen" label="Toggle FullScreen" oncommand="DoFullScreen()"/>
|
||||
<menuitem id="item-copy" label="Copy" oncommand="DoClipCopy()" />
|
||||
<menuitem id="item-paste" label="Paste" oncommand="DoClipPaste()"/>
|
||||
|
||||
</popup>
|
||||
|
||||
<!-- somehow tabbedbrowser needs this. Have to check its implementation and eliminate -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче