fix /watch mouseover dl link

This commit is contained in:
simon 2022-11-24 09:00:41 +07:00
parent a0e4a10f1f
commit 4f0452cf5f
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 8 additions and 2 deletions

View File

@ -165,8 +165,14 @@ function buildDlLink(channelContainer) {
sendUrl(currentLocation, "download");
});
dlLink.addEventListener("mouseover", e => {
let channelName = channelContainer.querySelector("#text").textContent;
e.target.title = "TA Download: " + channelName;
let subText
if (window.location.pathname == "/watch") {
subText = window.location.href;
} else {
subText = channelContainer.querySelector("#text").textContent;
};
e.target.title = "TA Download: " + subText;
});
Object.assign(dlLink.style, {
filter: "invert()",