зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1210381 - Remove view-source: when copying links. r=mconley, a=sylvestre
--HG-- extra : source : 41b849d4b94ac984be9dfecee1e8f0a9152262da
This commit is contained in:
Родитель
fd81145e62
Коммит
e3a1a2c82c
|
@ -1479,9 +1479,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);
|
||||
},
|
||||
|
||||
///////////////
|
||||
|
|
|
@ -29,8 +29,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]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче