Skip to content
Snippets Groups Projects
Commit 349fbb39 authored by Universum's avatar Universum
Browse files

fixed favicon bugs, removed debug logs

parent 17108a05
No related branches found
Tags 1.4.1
No related merge requests found
......@@ -25,3 +25,5 @@ pnpm-debug.log*
*.sw?
package-lock.json
*.xpi
eclipseTabs_firefox/dist
eclipseTabs_firefox
Update 1.4.1:
- fix minor Bug for FavIcons, for websites with no favicon (404) but with a non empty response body
- removed debug messages
Update 1.4.0:
- reduce Memory allocation
......
{
"manifest_version": 2,
"name": "eclipseTab",
"version": "1.4.0",
"version": "1.4.1",
"developer": {
"name": "UniversumGames",
"url": "https://universegame.de/"
......
{
"name": "eclipseTabs",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
......@@ -12,7 +12,7 @@ import { getManifest, getTheme, registerListener, startupHandler } from "./scrip
import { ColorScheme, FirefoxTheme, tabStructData } from "./scripts/interfaces"
import { upgradeHandler } from "./scripts/eclipseHandler"
import * as tabHelper from "./scripts/tabHelper"
import { resetAllFavIconRefCounter } from "./scripts/dataHandler/changer"
import { removeAllNonReferencedFavIcons, resetAllFavIconRefCounter } from "./scripts/dataHandler/changer"
export default class App extends Vue {
eclipseData = reactive<tabStructData>(createEmptyData())
......@@ -93,11 +93,12 @@ export default class App extends Vue {
resetAllFavIconRefCounter(that.eclipseData as tabStructData)
await updateTabsOnStartUp(that.eclipseData as tabStructData, that.eclipseData.rootFolder, tabs)
await updateTabs(that.eclipseData as tabStructData, tabs)
removeAllNonReferencedFavIcons(that.eclipseData as tabStructData)
that.$forceUpdate()
that.save()
that.updateVersion()
})
console.log("EclipseData", this.eclipseData)
// console.log("EclipseData", this.eclipseData)
// console.log("reloaded")
}
......
......@@ -292,7 +292,7 @@ export function addFavIcon(eclipseData: tabStructData, uuid: string, url: string
fav.imageSrc = favIcon
return true
} else {
if (favIcon == undefined || favIcon == "") return false
if (favIcon == undefined || favIcon == "" || favIcon.includes("<!DOCTYPE html>")) return false
eclipseData.favIconStorage[getHostname(url)] = { key: getHostname(url), imageSrc: favIcon, refBy: [uuid] } as StoredFavIcon
return true
}
......@@ -303,3 +303,9 @@ export function resetAllFavIconRefCounter(eclipseData: tabStructData) {
eclipseData.favIconStorage[key].refBy = []
}
}
export function removeAllNonReferencedFavIcons(eclipseData: tabStructData) {
for (const key in eclipseData.favIconStorage) {
if (eclipseData.favIconStorage[key].refBy.length == 0) delete eclipseData.favIconStorage[key]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment