mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-29 17:37:54 +01:00
fix like reformat option to work with new design
This commit is contained in:
1 parent
de1831f2c7
commit
87e922d41f
3 files changed
+30
-16
No files matched your search
@@ -24,7 +24,7 @@ function getButtons() {
|
||||
//--- If Menu Element Is Displayed: ---//
|
||||
if (document.getElementById("menu-container")?.offsetParent === null) {
|
||||
return document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div");
|
||||
//--- If Menu Element Isnt Displayed: ---//
|
||||
//--- If Menu Element Isn't Displayed: ---//
|
||||
} else {
|
||||
return document
|
||||
.getElementById("menu-container")
|
||||
@@ -42,7 +42,8 @@ function getLikeButton() {
|
||||
function getLikeTextContainer() {
|
||||
return (
|
||||
getLikeButton().querySelector("#text") ??
|
||||
getLikeButton().getElementsByTagName("yt-formatted-string")[0]
|
||||
getLikeButton().getElementsByTagName("yt-formatted-string")[0] ??
|
||||
getLikeButton().querySelector("span[role='text']")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user