Skip to content

Commit

Permalink
0.9.2 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annndruha committed Apr 3, 2022
1 parent fe06ded commit 99709f3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
7 changes: 3 additions & 4 deletions js/edit-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ function deleteEditPopup() {
function updateIconPreview() {
let link_value = document.getElementById("edit-link-text").value
let iconlink = document.getElementById("edit-icon-text").value

// Icon itself
let preview_div = document.getElementById("preview")
preview_div.setAttribute('link', link_value)
if (varDefined(iconlink)){
if (varDefined(link_value) && varDefined(iconlink)){
preview_div.setAttribute('icon-link', iconlink)
loadIcon('preview')
}
else if (varDefined(link_value)){
else if (varDefined(link_value) && !varDefined(iconlink)){
preview_div.removeAttribute('icon-link')
loadIcon('preview')
}
else {
Expand Down
17 changes: 8 additions & 9 deletions js/load-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@ function setIcon(id, data) {
}

function cacheIcon(id, iconBase64){
if (id !== 'preview'){
chrome.storage.local.get([id], function (res) {
let storage_value = res[id]
storage_value[0]['cache-icon'] = iconBase64
chrome.storage.local.set({[id]: storage_value}, () => {})
setIcon(id, iconBase64)
})
}
else {
if (id === 'preview') {
setIcon(id, iconBase64)
return
}
chrome.storage.local.get([id], function (res) {
let storage_value = res[id]
storage_value[0]['cache-icon'] = iconBase64
chrome.storage.local.set({[id]: storage_value}, () => {})
setIcon(id, iconBase64)
})
}

function clearIconCache(id) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Pulchra bookmarks",
"description": "Pulchra bookmarks extension",
"version": "0.9.1",
"version": "0.9.2",
"manifest_version": 3,
"minimum_chrome_version": "96",
"chrome_url_overrides": {
Expand Down

0 comments on commit 99709f3

Please sign in to comment.