<%
const likes = parseInt(engagement.likes) || 0;
const dislikes = parseInt(engagement.dislikes) || 0;
const total = likes + dislikes;
const likePercentage = total > 0 ? ((likes / total) * 100).toFixed(2) : 0;
const dislikePercentage = total > 0 ? ((dislikes / total) * 100).toFixed(2) : 0;
const getLikePercentageColor = (percentage) => {
if (percentage >= 80) {
return 'green';
} else if (percentage >= 50) {
return 'orange';
} else {
return 'red';
}
};
const getDislikePercentageColor = (percentage) => {
if (percentage >= 50) {
return 'red';
} else if (percentage >= 20) {
return 'orange';
} else {
return 'green';
}
};
const likeColor = getLikePercentageColor(likePercentage);
const dislikeColor = getDislikePercentageColor(dislikePercentage);
const userScore = (parseFloat(likePercentage) - parseFloat(dislikePercentage) / 2).toFixed(2);
const getUserScoreLabel = (score) => {
if (score >= 80) {
return 'Overwhelmingly Positive';
} else if (score >= 60) {
return 'Positive';
} else if (score >= 40) {
return 'Mixed';
} else if (score >= 20) {
return 'Negative';
} else {
return 'Overwhelmingly Negative';
}
};
const userScoreLabel = getUserScoreLabel(userScore);
const userScoreColor = userScore >= 80 ? 'green' : userScore >= 50 ? 'orange' : 'red';
%>
<%-String(channelurlfixer(inv_vid.descriptionHtml)).replace(/\n/g, "
").replace(/twitter\.com/g, "twitter.com").replace(/reddit\.com/g, "redlib.matthew.science") %>
Rating! :3
<%= likePercentage %>% of the users lieked the video!!
<%= dislikePercentage %>% of the users dislieked the video!!
User score:
<%= userScore %>- <%= userScoreLabel %>
Stats for 🤓
Video id : <%=inv_vid.videoId%>
ImmersiveAmbientModecolor: <% if (lightOrDark(color) == "light") { %><%=color%> (color 1)<% } %><% if (lightOrDark(color) == "dark") { %> <%=color2%> (color 2) <% } %>
Video Format :<% if (!qua) { %> 22 (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz <% } %>
<% if (qua === "medium") { %> 18 (320p) openh264 (https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz <% } %>
<% if (inv_vid.genre === "Music") { %>
Audio Format: ALAC lossless (https://codeberg.org/Ashley/poke/src/branch/main/alac) Audio/ Flac
<% } %>
<% if (inv_vid.genre !== "Music") { %>
Audio Format: Opus - Normalized audio
<% } %>
PokeTubeEncryptID: <%=sha384(inv_vid.videoId)%>
<% if (isvidious) { %>
Proxy : <%= u.replace("https://","") %> - refresh the page to change the proxy location
<% } %>
<% if (!isvidious) { %>
Proxy : tube-proxy.poketube.fun - refresh the page to change the proxy location
<% } %>
Date : <%- Date.now() %> - <%- useragent.os.replace("Linux", "GNU/Linux") %> on <%- useragent.browser %>
<% if (isvidious) { %>
Mystery text : <%=btoa(inv_vid.videoId + " i " + " lov " + " u " + "mobile "+ u.replace("https://","") ) %>
<% } %>
<% if (!isvidious) { %>
Mystery text : <%=btoa(inv_vid.videoId + " i " + " lov " + " u " + "tube-proxy.poketube.fun" ) %>
<% } %>
143 : true