Fixed missing tab icon images by loading a generic when icon is unavailable.

This commit is contained in:
Maxim Stewart 2018-05-01 13:05:16 -05:00
parent 3f1be9afe5
commit c514211f50
3 changed files with 11 additions and 14 deletions

View File

@ -1,12 +1,12 @@
# Tab-Search-Firefox # Tab-Search-Firefox
Search firefox tabs and get a list or automatic direct to the searched tab. Search Firefox tabs and get a list or automatic direct to the searched tab.
# Version: 1.1.5 # Version: 1.1.6
Added grid like view plus changed look. Can now manage tabs through the interface such as move or close them. Fixed missing tab icon images by loading a generic when icon is unavailable.
# Images # Images
![1 old list style](images/pic1.jpg) ![1 new list style](images/pic3.jpg)
![2 old search style](images/pic2.jpg) ![2 new search stylelit](images/pic4.jpg)
![3 new list style](images/pic3.jpg) ![3 drag and drop functionality](images/pic5.jpg)
![4 new search stylelit](images/pic4.jpg) ![4 old list style](images/pic1.jpg)
![5 drag and drop functionality](images/pic5.jpg) ![5 old search style](images/pic2.jpg)

View File

@ -1,7 +1,7 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "Tab Search", "name": "Tab Search",
"version": "1.1.5", "version": "1.1.6",
"description": "Search Tabs and switch to them quickly.", "description": "Search Tabs and switch to them quickly.",
"applications": { "applications": {

View File

@ -33,11 +33,8 @@ function createContainer(tab) {
icoImgTag.id = "faveIcon"; icoImgTag.id = "faveIcon";
icoImgTag.className = "thumbImg"; icoImgTag.className = "thumbImg";
if (tab.favIconUrl == null || tab.favIconUrl == "") { icoImgTag.onerror = function() { icoImgTag.src = "../icons/tab.png"; }
icoImgTag.src = "../icons/tab.png"; icoImgTag.src = tab.favIconUrl;
} else {
icoImgTag.src = tab.favIconUrl;
}
centerTag.appendChild(icoImgTag); centerTag.appendChild(icoImgTag);
spanTag.appendChild(closeImgTag); spanTag.appendChild(closeImgTag);