sendVideoIds removed, sponsor links updated

This commit is contained in:
Dmitrii Selivanov committed 2022-04-26 23:07:05 +02:00
1 parent bdc28cad33
commit a4806c1f47
9 files changed
+62 -79

No files matched your search

-27
View File
@@ -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,