Added Task Adding, Removing, Editing and corrected some relatex tests. Coverage still not 100%

This commit is contained in:
2025-12-03 19:08:16 +01:00
parent 4fa55c8607
commit 20daf315ca
68 changed files with 2398 additions and 400 deletions

View File

@@ -65,29 +65,6 @@
}
}
function initClipboardCopyButton() {
document.querySelectorAll(".clipboard-copy-btn").forEach((button) => {
const copyElementId = button.getAttribute("data-copy-element-id");
const elementWithCodeToSelect = document.getElementById(copyElementId);
button.addEventListener("click", () => {
const text = elementWithCodeToSelect.innerText.trim();
navigator.clipboard
.writeText(text)
.then(() => {
button.textContent = "Copied!";
setTimeout(() => {
button.textContent = "Copy";
}, 1500);
})
.catch((err) => {
alert("Failed to copy to the clipboard: '" + err.message + "'. Check JavaScript console for more details.")
console.warn("Failed to copy to the clipboard", err);
});
});
});
}
function initControls() {
if (findCodeBlocks().length > 0) {
const checkBox = getCheckBox();
@@ -98,8 +75,6 @@
removeClass(label, "hidden");
}
initClipboardCopyButton()
}
class TabManager {