mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Also send views, year and channelID
This commit is contained in:
@@ -881,14 +881,8 @@ async function unlistedCheck() {
|
|||||||
?.innerHTML?.match(/20[0-9]{2}/);
|
?.innerHTML?.match(/20[0-9]{2}/);
|
||||||
const year = yearMatches ? parseInt(yearMatches[0]) : -1;
|
const year = yearMatches ? parseInt(yearMatches[0]) : -1;
|
||||||
const isOld = !isNaN(year) && year < 2017 && year > 2004;
|
const isOld = !isNaN(year) && year < 2017 && year > 2004;
|
||||||
const isHighViews = parseInt(videoInfo?.videoDetails?.viewCount) > 20000;
|
const views = parseInt(videoInfo?.videoDetails?.viewCount);
|
||||||
|
const isHighViews = views > 20000;
|
||||||
console.log({
|
|
||||||
isUnlisted,
|
|
||||||
year,
|
|
||||||
isOld,
|
|
||||||
isHighViews
|
|
||||||
})
|
|
||||||
|
|
||||||
if (isUnlisted && isOld && isHighViews) {
|
if (isUnlisted && isOld && isHighViews) {
|
||||||
// Ask if they want to submit this videoID
|
// Ask if they want to submit this videoID
|
||||||
@@ -916,7 +910,10 @@ async function unlistedCheck() {
|
|||||||
name: "Submit",
|
name: "Submit",
|
||||||
listener: () => {
|
listener: () => {
|
||||||
utils.asyncRequestToServer("POST", "/api/unlistedVideo", {
|
utils.asyncRequestToServer("POST", "/api/unlistedVideo", {
|
||||||
videoID: sponsorVideoID
|
videoID: sponsorVideoID,
|
||||||
|
year,
|
||||||
|
views,
|
||||||
|
channelID: channelIDInfo.status === ChannelIDStatus.Found ? channelIDInfo.id : undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
notice.close();
|
notice.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user