Bug 1147456 - Fix broken copy context menu in Page Info r=Neil

This commit is contained in:
Philip Chee 2015-04-15 13:46:14 +08:00
Родитель 963602b4b7
Коммит 088926a12c
1 изменённых файлов: 3 добавлений и 13 удалений

Просмотреть файл

@ -233,14 +233,6 @@ const nsICookiePermission = Components.interfaces.nsICookiePermission;
const nsICertificateDialogs = Components.interfaces.nsICertificateDialogs;
const CERTIFICATEDIALOGS_CONTRACTID = "@mozilla.org/nsCertificateDialogs;1"
// clipboard helper
try {
const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
}
catch(e) {
// do nothing, later code will handle the error
}
// Interface for image loading content
const nsIImageLoadingContent = Components.interfaces.nsIImageLoadingContent;
@ -290,7 +282,6 @@ var onFinished = [ ];
// These functions are called once when the Page Info window is closed.
var onUnloadRegistry = [ ];
/* Called when PageInfo window is loaded. Arguments are:
* window.arguments[0] - (optional) an object consisting of
* - doc: (optional) document to use for source. if not provided,
@ -1369,12 +1360,11 @@ function getSelectedItems(linksMode)
function doCopy(isLinkMode)
{
if (!gClipboardHelper)
return;
var text = getSelectedItems(isLinkMode);
gClipboardHelper.copyString(text.join("\n"), gDocument);
Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper)
.copyString(text.join("\n"), gDocument);
}
function doSelectAll()