add masterpiece video :3

This commit is contained in:
ashley 2024-07-03 23:11:22 +00:00
parent 34c7b787e7
commit b765e8eb06

View file

@ -678,6 +678,13 @@ background-color: #0000;
border: 2px solid red; border: 2px solid red;
border-radius: 10px; border-radius: 10px;
} }
.rainbow-gradient {
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
-webkit-background-clip: text;
color: transparent;
}
</style> </style>
<noscript> <noscript>
<style> <style>
@ -1658,61 +1665,65 @@ WIP! </a>
Rating : <%=engagement.rating.toLocaleString()%> (<%=engagement.dislikes.toLocaleString()%>/<%=engagement.likes.toLocaleString()%> <abbr title="Like To dislike ratio - the number to the left is dislike count and the one to the right is like count :3">LTDR</abbr>) <br> Rating : <%=engagement.rating.toLocaleString()%> (<%=engagement.dislikes.toLocaleString()%>/<%=engagement.likes.toLocaleString()%> <abbr title="Like To dislike ratio - the number to the left is dislike count and the one to the right is like count :3">LTDR</abbr>) <br>
<% <%
const likes = parseInt(engagement.likes) || 0; const likes = parseInt(engagement.likes) || 0;
const dislikes = parseInt(engagement.dislikes) || 0; const dislikes = parseInt(engagement.dislikes) || 0;
const total = likes + dislikes; const total = likes + dislikes;
const likePercentage = total > 0 ? ((likes / total) * 100).toFixed(2) : 0; const likePercentage = total > 0 ? ((likes / total) * 100).toFixed(2) : 0;
const dislikePercentage = total > 0 ? ((dislikes / total) * 100).toFixed(2) : 0; const dislikePercentage = total > 0 ? ((dislikes / total) * 100).toFixed(2) : 0;
const getLikePercentageColor = (percentage) => { const getLikePercentageColor = (percentage) => {
if (percentage >= 80) { if (percentage >= 80) {
return 'green'; return 'green';
} else if (percentage >= 50) { } else if (percentage >= 50) {
return 'orange'; return 'orange';
} else { } else {
return 'red'; return 'red';
} }
}; };
const getDislikePercentageColor = (percentage) => { const getDislikePercentageColor = (percentage) => {
if (percentage >= 50) { if (percentage >= 50) {
return 'red'; return 'red';
} else if (percentage >= 20) { } else if (percentage >= 20) {
return 'orange'; return 'orange';
} else { } else {
return 'green'; return 'green';
} }
}; };
const likeColor = getLikePercentageColor(likePercentage); const likeColor = getLikePercentageColor(likePercentage);
const dislikeColor = getDislikePercentageColor(dislikePercentage); const dislikeColor = getDislikePercentageColor(dislikePercentage);
const userScore = (parseFloat(likePercentage) - parseFloat(dislikePercentage) / 2).toFixed(2); const userScore = (parseFloat(likePercentage) - parseFloat(dislikePercentage) / 2).toFixed(2);
const getUserScoreLabel = (score) => { const getUserScoreLabel = (score) => {
if (score >= 80) { if (score >= 98) {
return 'Overwhelmingly Positive'; return 'Masterpiece Video';
} else if (score >= 60) { } else if (score >= 80) {
return 'Positive'; return 'Overwhelmingly Positive';
} else if (score >= 40) { } else if (score >= 60) {
return 'Mixed'; return 'Positive';
} else if (score >= 20) { } else if (score >= 40) {
return 'Negative'; return 'Mixed';
} else { } else if (score >= 20) {
return 'Overwhelmingly Negative'; return 'Negative';
} } else {
}; return 'Overwhelmingly Negative';
}
};
const userScoreLabel = getUserScoreLabel(userScore); const userScoreLabel = getUserScoreLabel(userScore);
const userScoreColor = userScore >= 80 ? 'green' : userScore >= 50 ? 'orange' : 'red'; const userScoreColor = userScore >= 80 ? 'green' : userScore >= 50 ? 'orange' : 'red';
const userScoreClass = userScore >= 98.00 ? 'rainbow-gradient' : '';
%> %>
<br><span style="color: <%= likeColor %>;"><%= likePercentage %>%</span> of the users lieked the video!! <br> <br><span style="color: <%= likeColor %>;"><%= likePercentage %>%</span> of the users lieked the video!! <br>
<span style="color: <%= dislikeColor %>;"><%= dislikePercentage %>%</span> of the users dislieked the video!! <br> <span style="color: <%= dislikeColor %>;"><%= dislikePercentage %>%</span> of the users dislieked the video!! <br>
User score: <span style="color: <%= userScoreColor %>;"><%= userScore %></span>- <%= userScoreLabel %><br><br> User score: <span class="<%= userScoreClass %>" style="color: <%= userScoreColor %>;"><%= userScore %></span>- <%= userScoreLabel %><br><br>
RYD date created : <%=engagement.dateCreated.toLocaleString()%> <br> RYD date created : <%=engagement.dateCreated.toLocaleString()%> <br>
<a href="https://returnyoutubedislikeapi.com/votes?videoId=<%=inv_vid.videoId%>">See in json</a> <a href="https://returnyoutubedislikeapi.com/votes?videoId=<%=inv_vid.videoId%>">See in json</a>