mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 10:52:20 +01:00
sendVideoIds removed, sponsor links updated
This commit is contained in:
1 parent
bdc28cad33
commit
a4806c1f47
9 files changed
+62
-79
No files matched your search
@@ -21,32 +21,6 @@ function sendVote(vote) {
|
||||
}
|
||||
}
|
||||
|
||||
function sendVideoIds() {
|
||||
let links = Array.from(
|
||||
document.getElementsByClassName(
|
||||
"yt-simple-endpoint ytd-compact-video-renderer"
|
||||
)
|
||||
).concat(
|
||||
Array.from(
|
||||
document.getElementsByClassName("yt-simple-endpoint ytd-thumbnail")
|
||||
)
|
||||
);
|
||||
// Also try mobile
|
||||
if (links.length < 1)
|
||||
links = Array.from(
|
||||
document.querySelectorAll(
|
||||
".large-media-item-metadata > a, a.large-media-item-thumbnail-container"
|
||||
)
|
||||
);
|
||||
const ids = links
|
||||
.filter((x) => x.href && x.href.indexOf("/watch?v=") > 0)
|
||||
.map((x) => getVideoId(x.href));
|
||||
getBrowser().runtime.sendMessage({
|
||||
message: "send_links",
|
||||
videoIds: ids,
|
||||
});
|
||||
}
|
||||
|
||||
function likeClicked() {
|
||||
if (checkForSignInButton() === false) {
|
||||
if (storedData.previousState === DISLIKED_STATE) {
|
||||
@@ -166,7 +140,6 @@ function handleNumberDisplayReformatLikesChangeEvent(value) {
|
||||
|
||||
export {
|
||||
sendVote,
|
||||
sendVideoIds,
|
||||
likeClicked,
|
||||
dislikeClicked,
|
||||
addLikeDislikeEventListener,
|
||||
|
||||
Reference in new issue
Block a user