mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Refactor blog click event listener in global.js in web UI to also add the event to the title of the news post
This commit is contained in:
parent
ab921f06e1
commit
60b0a7b74b
1 changed files with 5 additions and 1 deletions
|
|
@ -110,7 +110,11 @@ class News {
|
|||
document
|
||||
.querySelector("[data-news-container]")
|
||||
.insertAdjacentHTML("afterbegin", cleanHTML);
|
||||
document.querySelector(`.blog-click-${news.slug}`).addEventListener("click", function () { window.open(`${BASE_URL}/blog/post/${news.slug}`, '_blank') });
|
||||
document.querySelectorAll(`.blog-click-${news.slug}`).forEach((slug) => {
|
||||
slug.addEventListener("click", function () {
|
||||
window.open(`${BASE_URL}/blog/post/${news.slug}`, "_blank");
|
||||
});
|
||||
});
|
||||
document.querySelectorAll(".blog-click-tag").forEach((tag) => {
|
||||
tag.target = "_blank";
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue