New YouTube UI fix

This commit is contained in:
Anarios committed 2023-08-02 14:00:40 +02:00
1 parent 5c73825aad
commit 889089ad1d
1 file changed
+8
+8
View File
@@ -60,6 +60,14 @@ function createDislikeTextContainer() {
getDislikeButton().querySelector("button").insertBefore(textNodeClone, insertPreChild);
getDislikeButton().querySelector("button").classList.remove("yt-spec-button-shape-next--icon-button");
getDislikeButton().querySelector("button").classList.add("yt-spec-button-shape-next--icon-leading");
if(textNodeClone.querySelector("span[role='text']") === null) {
const span = document.createElement("span");
span.setAttribute("role", "text");
while(textNodeClone.firstChild){
textNodeClone.removeChild(textNodeClone.firstChild);
}
textNodeClone.appendChild(span);
}
textNodeClone.querySelector("span[role='text']").innerText = "";
return textNodeClone.querySelector("span[role='text']");
}