зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1210381 - Remove view-source: when copying links. r=mconley
--HG-- extra : transplant_source : %8Df%9Es%8B%EC%5B%DC%17%D0%3F%3A7%AB%26.%C0wGz
This commit is contained in:
Родитель
8ee9792b23
Коммит
00ecc8cd66
|
@ -1471,9 +1471,11 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
|
||||
copyLink: function() {
|
||||
// If we're in a view source tab, remove the view-source: prefix
|
||||
let linkURL = this.linkURL.replace(/^view-source:/, "");
|
||||
var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
|
||||
getService(Ci.nsIClipboardHelper);
|
||||
clipboard.copyString(this.linkURL);
|
||||
clipboard.copyString(linkURL);
|
||||
},
|
||||
|
||||
///////////////
|
||||
|
|
|
@ -31,8 +31,6 @@ add_task(function *() {
|
|||
|
||||
contextMenu = document.getElementById("contentAreaContextMenu");
|
||||
|
||||
// Prepend view-source to this one as it opens in a tab.
|
||||
expectedData[0][3] = "view-source:" + expectedData[0][3];
|
||||
for (let test of expectedData) {
|
||||
yield* checkMenuItems(contextMenu, true, test[0], test[1], test[2], test[3]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче