diff --git a/edit.html b/edit.html index 63383e4f..848eab0b 100644 --- a/edit.html +++ b/edit.html @@ -67,6 +67,10 @@ #sections > div:not(:first-child) { border-top: 2px solid black; } + .dirty > label::before { + content: "*"; + font-weight: bold; + } #basic-info label { display: inline-block; width: 10em; diff --git a/edit.js b/edit.js index f775ddc7..4e9afa34 100644 --- a/edit.js +++ b/edit.js @@ -85,10 +85,7 @@ function indicateCodeChange(cm) { var clean = cm.isClean(cm.lastChange); if (clean != cm.lastClean) { cm.lastClean = clean; - var label = cm.getTextArea().previousElementSibling; - if (label) { - label.textContent = label.textContent.replace(/\*?$/, clean ? '' : '*'); - } + cm.getTextArea().parentNode.classList[clean ? "remove" : "add"]("dirty"); } };