зеркало из https://github.com/mozilla/gecko-dev.git
Bug 730941 - Add "view image" to context menu. r=wesj
This commit is contained in:
Родитель
ae8fbb6244
Коммит
f2fe12e41d
|
@ -652,6 +652,15 @@ var BrowserApp = {
|
|||
aTarget.muted = false;
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.viewImage"),
|
||||
NativeWindow.contextmenus.imageLocationCopyableContext,
|
||||
function(aTarget) {
|
||||
let url = aTarget.src;
|
||||
ContentAreaUtils.urlSecurityCheck(url, aTarget.ownerDocument.nodePrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
BrowserApp.loadURI(url);
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.copyImageLocation"),
|
||||
NativeWindow.contextmenus.imageLocationCopyableContext,
|
||||
function(aTarget) {
|
||||
|
|
|
@ -174,6 +174,7 @@ contextmenu.copyPhoneNumber=Copy Phone Number
|
|||
contextmenu.sharePhoneNumber=Share Phone Number
|
||||
contextmenu.changeInputMethod=Select Input Method
|
||||
contextmenu.fullScreen=Full Screen
|
||||
contextmenu.viewImage=View Image
|
||||
contextmenu.copyImageLocation=Copy Image Location
|
||||
contextmenu.shareImage=Share Image
|
||||
# LOCALIZATION NOTE (contextmenu.search):
|
||||
|
|
Загрузка…
Ссылка в новой задаче