comparison sidebar/js/tab-collection-manager.js @ 1:b0827360b8e4

Store favicons and thumbnails in local database
author Guido Berhoerster <guido+set-aside@berhoerster.name>
date Mon, 19 Nov 2018 17:26:17 +0100
parents d13d59494613
children 49ec0da1e698
comparison
equal deleted inserted replaced
0:d13d59494613 1:b0827360b8e4
76 76
77 let tabLinkElement = tabItemNode.querySelector('.tab-link'); 77 let tabLinkElement = tabItemNode.querySelector('.tab-link');
78 tabLinkElement.href = tab.url; 78 tabLinkElement.href = tab.url;
79 tabLinkElement.title = tab.title; 79 tabLinkElement.title = tab.title;
80 80
81 if (tab.thumbnailUrl !== null) { 81 if (tab.thumbnail !== null) {
82 tabItemNode.querySelector('.tab-thumbnail').src = 82 tabItemNode.querySelector('.tab-thumbnail').src =
83 tab.thumbnailUrl; 83 URL.createObjectURL(tab.thumbnail);
84 } 84 }
85 85
86 if (tab.favIconUrl !== null) { 86 if (tab.favIcon !== null) {
87 tabItemNode.querySelector('.tab-favicon').src = tab.favIconUrl; 87 tabItemNode.querySelector('.tab-favicon').src =
88 URL.createObjectURL(tab.favIcon);
88 } 89 }
89 90
90 tabItemNode.querySelector('.tab-title').textContent = tab.title; 91 tabItemNode.querySelector('.tab-title').textContent = tab.title;
91 92
92 tabItemNode.querySelector('.remove-tab').title = 93 tabItemNode.querySelector('.remove-tab').title =