mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
change Diff to output <ins>, <del>
This commit is contained in:
parent
6ed9d4554a
commit
efda16b039
4 changed files with 14 additions and 5 deletions
|
@ -119,9 +119,9 @@ class Diff extends Operation {
|
|||
|
||||
for (let i = 0; i < diff.length; i++) {
|
||||
if (diff[i].added) {
|
||||
if (showAdded) output += "<span class='hl5'>" + Utils.escapeHtml(diff[i].value) + "</span>";
|
||||
if (showAdded) output += "<ins>" + Utils.escapeHtml(diff[i].value) + "</ins>";
|
||||
} else if (diff[i].removed) {
|
||||
if (showRemoved) output += "<span class='hl3'>" + Utils.escapeHtml(diff[i].value) + "</span>";
|
||||
if (showRemoved) output += "<del>" + Utils.escapeHtml(diff[i].value) + "</del>";
|
||||
} else if (!showSubtraction) {
|
||||
output += Utils.escapeHtml(diff[i].value);
|
||||
}
|
||||
|
|
|
@ -36,4 +36,5 @@
|
|||
@import "./layout/_structure.css";
|
||||
|
||||
/* Operations */
|
||||
@import "./operations/diff.css";
|
||||
@import "./operations/json.css";
|
||||
|
|
8
src/web/stylesheets/operations/diff.css
Normal file
8
src/web/stylesheets/operations/diff.css
Normal file
|
@ -0,0 +1,8 @@
|
|||
del {
|
||||
background-color: var(--hl3);
|
||||
}
|
||||
|
||||
ins {
|
||||
text-decoration: underline; /* shouldn't be needed, but Chromium doesn't copy to clipboard without it */
|
||||
background-color: var(--hl5);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue