获取favicon的换一下顺序
This commit is contained in:
parent
5e07109055
commit
a9a21b1bd2
|
|
@ -960,11 +960,11 @@ api.getFaviconByTimer = function() {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// http://www.cnblogs.com/zhangwei595806165/p/4984912.html 各种方法都试一遍
|
// http://www.cnblogs.com/zhangwei595806165/p/4984912.html 各种方法都试一遍
|
||||||
var faviconUrl = "http://g.soz.im/" + url; // 默认地址
|
var faviconUrl = "http://www.google.com/s2/favicons?domain=" + url; // 默认地址
|
||||||
if (faviconState == 1) {
|
if (faviconState == 1) {
|
||||||
faviconUrl = "http://www.google.com/s2/favicons?domain=" + url;
|
|
||||||
} else if (faviconState == 2) {
|
|
||||||
faviconUrl = "http://favicon.byi.pw/?url=" + url;
|
faviconUrl = "http://favicon.byi.pw/?url=" + url;
|
||||||
|
} else if (faviconState == 2) {
|
||||||
|
faviconUrl = "http://g.soz.im/" + url;
|
||||||
}
|
}
|
||||||
download(faviconUrl).then(data => {
|
download(faviconUrl).then(data => {
|
||||||
fs.writeFileSync(faviconPath, data);
|
fs.writeFileSync(faviconPath, data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue