зеркало из https://github.com/mozilla/pjs.git
Bug 467828 - use cached favicons for the Recently Closed Tabs menu. r=gavin
This commit is contained in:
Родитель
b7d4e5b27d
Коммит
7938490368
|
@ -6204,8 +6204,13 @@ HistoryMenu.populateUndoSubmenu = function PHM_populateUndoSubmenu() {
|
|||
for (var i = 0; i < undoItems.length; i++) {
|
||||
var m = document.createElement("menuitem");
|
||||
m.setAttribute("label", undoItems[i].title);
|
||||
if (undoItems[i].image)
|
||||
m.setAttribute("image", undoItems[i].image);
|
||||
if (undoItems[i].image) {
|
||||
let iconURL = undoItems[i].image;
|
||||
// don't initiate a connection just to fetch a favicon (see bug 467828)
|
||||
if (/^https?:/.test(iconURL))
|
||||
iconURL = "moz-anno:favicon:" + iconURL;
|
||||
m.setAttribute("image", iconURL);
|
||||
}
|
||||
m.setAttribute("class", "menuitem-iconic bookmark-item");
|
||||
m.setAttribute("value", i);
|
||||
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
|
||||
|
|
Загрузка…
Ссылка в новой задаче