[Pkg-mozext-commits] [tabmixplus] 77/147: Set icon on pending tabs
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 9ce937a289005c09d903e225f8193347e5ac18bf
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Dec 26 22:08:08 2016 +0200
Set icon on pending tabs
---
chrome/content/places/places.js | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/chrome/content/places/places.js b/chrome/content/places/places.js
index c449393..6c8b5ef 100644
--- a/chrome/content/places/places.js
+++ b/chrome/content/places/places.js
@@ -367,6 +367,19 @@ var TMP_Places = {
let fnName = Tabmix.isVersion(280) ? "restoreTabs" :
"restoreHistoryPrecursor";
TabmixSvc.SessionStore[fnName](window, tabs, tabsData, 0);
+ // set icon on pending tabs
+ const pendingData = tabs.map(tab => ({tab, url: tabsData.shift().entries[0].url}))
+ .filter(({tab, url}) => tab.hasAttribute("pending") && url != "about:blank");
+ for (let data of pendingData) {
+ const {tab, url} = data;
+ const entryURI = BrowserUtils.makeURI(url, null, null);
+ PlacesUtils.favicons.getFaviconURLForPage(entryURI, uri => {
+ // skip tab that already restored
+ if (tab.hasAttribute("pending") && uri) {
+ gBrowser.setIcon(tab, uri);
+ }
+ });
+ }
},
loadTabs: function(tabs, tabsData, ids) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list