Added Task Adding, Removing, Editing and corrected some relatex tests. Coverage still not 100%
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user