Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
rberenguel committed Nov 5, 2024
1 parent ec5f140 commit 2973ffc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/taskUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ function addTasksToDiv(_tasks, targetDivId) {
const taskText = d();
const taskExtra = d();
taskText.classList.add("taskText");
const taskTitle = d();
taskText.appendChild(taskTitle)
taskExtra.classList.add("taskExtra");
let text = task.text.replace("#kr", "✨ #kr");
const extra = task.extra ? task.extra : "";
Expand Down Expand Up @@ -358,9 +360,9 @@ function addTasksToDiv(_tasks, targetDivId) {
);
}
}
taskText.innerHTML = text;
taskTitle.innerHTML = text;
taskExtra.innerHTML = extra;
taskText.addEventListener("contextmenu", (e) => {
taskTitle.addEventListener("contextmenu", (e) => {
e.preventDefault();
const allRows = Array.from(document.querySelectorAll(".taskRow"));
let skip = false;
Expand Down Expand Up @@ -411,9 +413,9 @@ function addTasksToDiv(_tasks, targetDivId) {
});
});
if (link) {
taskText.addEventListener("click", (e) => (window.location.href = link));
taskText.innerHTML += " 🔗";
taskText.style.cursor = "pointer";
taskTitle.addEventListener("click", (e) => (window.location.href = link));
taskTitle.innerHTML += " 🔗";
taskTitle.style.cursor = "pointer";
}
const extralinkWrapper = document.createElement("div");
extralinkWrapper.classList.add("extralinkWrapper");
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ span[data-title]:hover::after {
border-radius: 0.5em;
}

.taskText > div {
display: inline;
}

.taskText span.extralink.visited {
color: var(--light-grey-trans);
}
Expand Down

0 comments on commit 2973ffc

Please sign in to comment.