mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 02:41:22 +01:00
Merge issues fixed, core reformatted with prettier
This commit is contained in:
1 parent
6894a706aa
commit
b7029ce426
14 files changed
+315
-275
No files matched your search
@@ -3,12 +3,16 @@ import { isInViewport } from "./utils";
|
||||
|
||||
function getButtons() {
|
||||
//--- If Watching Youtube Shorts: ---//
|
||||
if(isShorts()) {
|
||||
let elements=document.querySelectorAll(isMobile() ? "ytm-like-button-renderer" : "#like-button > ytd-like-button-renderer");
|
||||
for(let element of elements) {
|
||||
if (isShorts()) {
|
||||
let elements = document.querySelectorAll(
|
||||
isMobile()
|
||||
? "ytm-like-button-renderer"
|
||||
: "#like-button > ytd-like-button-renderer"
|
||||
);
|
||||
for (let element of elements) {
|
||||
//Youtube Shorts can have multiple like/dislike buttons when scrolling through videos
|
||||
//However, only one of them should be visible (no matter how you zoom)
|
||||
if(isInViewport(element)) {
|
||||
if (isInViewport(element)) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user