Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 27, 2023
1 parent 32611a7 commit 3caaee5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2908,15 +2908,11 @@ class XpraClient {
xdg_image(icon_data, icon_type) {
const img = new Image();
if (typeof icon_data !== "undefined") {
let image_type = "image/"+icon_type;
if (icon_type == "svg") {
img.src = `data:image/svg+xml;base64,${Utilities.ArrayBufferToBase64(
icon_data
)}`;
} else if (icon_type == "png" || icon_type == "jpeg") {
img.src = `data:image/${icon_type};base64,${Utilities.ArrayBufferToBase64(
icon_data
)}`;
image_type = "image/svg+xml";
}
img.src = `data:{image_type};base64,${Utilities.ArrayBufferToBase64(icon_data)}`;
}
img.className = "menu-content-left";
img.height = 24;
Expand Down

0 comments on commit 3caaee5

Please sign in to comment.