Skip to content

Commit

Permalink
Merge pull request #38 from p-l-/add-screenshots
Browse files Browse the repository at this point in the history
Support screenshots from IVRE
  • Loading branch information
p-l- authored Jan 28, 2023
2 parents 9567384 + 3a6b9fb commit 20ac861
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ interface IvrePort {
service_product?: string;
service_version?: string;
service_extrainfo?: string;
screenshot?: string;
screendata?: string;
}

interface IvreTag {
Expand Down Expand Up @@ -649,9 +651,16 @@ class IvreSearchView extends IvreSearch {
);
}
});
if (port.screenshot === "field" && port.screendata) {
tmp_answer += `\n![](data:image/png;base64,${port.screendata})\n`;
}
tmp_answer += "\n";
});
if (tmp_answer) {
answer += `\n## Ports ##\n${tmp_answer}`;
answer += `\n## Ports ##\n${tmp_answer.substring(
0,
tmp_answer.length - 1
)}`;
}
return answer;
}
Expand Down

0 comments on commit 20ac861

Please sign in to comment.