Skip to content

Commit

Permalink
popup列出当前打开的所有tab功能,加上favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
scoful committed Dec 31, 2019
1 parent d592f96 commit 14c3378
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
var i;
tabs.vm.init();
for (i = 0; i < allTabs.length; i += 1) {
var tab = { "title": allTabs[i].title, "id": allTabs[i].id };
var tab = { "title": allTabs[i].title, "id": allTabs[i].id, "favIconUrl": allTabs[i].favIconUrl };
tabs.vm.list.push(tab);
}
};
Expand All @@ -222,7 +222,8 @@
tabs.vm.rmTab(i);
event.stopPropagation();
}
}), m("span", {}, tab.title)])
}), m('img', { src: tab.favIconUrl, height: '10', width: '10' }),
' ', m("span", {}, tab.title)])
]);
});
};
Expand Down

0 comments on commit 14c3378

Please sign in to comment.