mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-03 11:21:20 +01:00
Prettier applied to whole project, prettier added to pre-commit hook
This commit is contained in:
1 parent
47517ce0bd
commit
b133adeecb
54 files changed
+534
-441
No files matched your search
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"presets": ["@babel/preset-env"]
|
||||
"presets": ["@babel/preset-env"],
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
@@ -1,6 +1,5 @@
|
||||
Read this in other languages: [русский](CONTRIBUTINGru.md), [Nederlands](CONTRIBUTINGnl.md), [Français](CONTRIBUTINGfr.md), [Türkçe](CONTRIBUTINGtr.md), [українська](CONTRIBUTINGuk.md), [Polski](CONTRIBUTINGpl.md)
|
||||
|
||||
|
||||
# Welcome To Return YouTube Dislikes contributing guide
|
||||
|
||||
Thank you for investing your time in contributing to our project! All your changes will be reflected in the next version of the extension (or the [website](https://www.returnyoutubedislike.com/)).
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
Lisez ceci dans d'autres langues : [English](CONTRIBUTING.md), [русский](CONTRIBUTINGru.md), Nederlands](CONTRIBUTINGnl.md), [Türkçe](CONTRIBUTINGtr.md), [українська](CONTRIBUTINGuk.md), [Polski](CONTRIBUTINGpl.md)
|
||||
|
||||
|
||||
# Bienvenue dans le guide de contribution à Return YouTube Dislikes
|
||||
|
||||
Merci d'investir votre temps pour contribuer à notre projet ! Toutes vos modifications seront prises en compte dans la prochaine version de l'extension (ou du site web).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Read this in other languages: [English](CONTRIBUTING.md), [русский](CONTRIBUTINGru.md), [Nederlands](CONTRIBUTINGnl.md), [Français](CONTRIBUTINGfr.md), [Türkçe](CONTRIBUTINGtr.md), [українська](CONTRIBUTINGuk.md)
|
||||
|
||||
|
||||
# Witamy w przewodniku współtworzenia Return YouTube Dislike
|
||||
|
||||
Dziękujemy za zainwestowanie czasu w rozwój naszego projektu! Wszystkie Twoje zmiany znajdą się w następnej wersji rozszerzenia ([bądź strony](https://www.returnyoutubedislike.com/)).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Прочитать на других языках: [English](CONTRIBUTING.md), [Nederlands](CONTRIBUTINGnl.md), [Français](CONTRIBUTINGfr.md), [Türkçe](CONTRIBUTINGtr.md), [українська](CONTRIBUTINGuk.md), [Polski](CONTRIBUTINGpl.md)
|
||||
|
||||
|
||||
# Добро пожаловать в руководство по внесению вклада Return YouTube Dislikes
|
||||
|
||||
Благодарим вас за то, что вы потратили своё время на участие в нашем проекте! Все ваши изменения будут отражены в следующей версии расширения (или на [сайте](https://www.returnyoutubedislike.com/)).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Read this in other languages: [русский](FAQru.md), [Français](FAQfr.md), [Nederlands](FAQnl.md), [Türkçe](FAQtr.md), [українська](FAQuk.md), [Polski](FAQpl.md)
|
||||
|
||||
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Before asking a question on GitHub or Discord, please refer to this.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Lisez ceci dans d'autres langues : [English](FAQ.md), [русский](FAQru.md), [Nederlands](FAQnl.md), [Türkçe](FAQtr.md), [українська](FAQuk.md), [Polski](FAQpl.md)
|
||||
|
||||
|
||||
# Foire Aux Questions
|
||||
|
||||
## Avant de poser une question sur GitHub ou Discord, veuillez vous référer à ceci.
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
Read this in other languages: [English](FAQ.md), [русский](FAQru.md), [Français](FAQfr.md), [Nederlands](FAQnl.md), [Türkçe](FAQtr.md), [українська](FAQuk.md)
|
||||
|
||||
Read this in other languages: [English](FAQ.md), [русский](FAQru.md), [Français](FAQfr.md), [Nederlands](FAQnl.md), [Türkçe](FAQtr.md), [українська](FAQuk.md)
|
||||
|
||||
# Często zadawane pytania
|
||||
|
||||
|
||||
+6
-2
@@ -1,25 +1,29 @@
|
||||
Read this in other languages: [English](FAQ.md), [Nederlands](FAQnl.md), Français](FAQfr.md), [Türkçe](FAQtr.md), [українська](FAQuk.md), [Polski](FAQpl.md)
|
||||
|
||||
Read this in other languages: [English](FAQ.md), [Nederlands](FAQnl.md), Français](FAQfr.md), [Türkçe](FAQtr.md), [українська](FAQuk.md), [Polski](FAQpl.md)
|
||||
|
||||
# Часто задаваемые вопросы
|
||||
|
||||
## Прежде чем задать вопрос на GitHub или в Discord, пожалуйста, ознакомьтесь с этим.
|
||||
|
||||
### **1. Откуда это расширение получает данные?**
|
||||
|
||||
Комбинация API Google и старых данных.
|
||||
|
||||
Мы сохраняем все имеющиеся данные в нашей базе данных, чтобы они были доступны после того, как Google прекратит подсчёт отметок «Не нравится» в своём API.
|
||||
|
||||
### **2. Количество не понравившихся видео не обновляется**
|
||||
|
||||
В настоящее время видео с отметками «Не нравится» кэшируются и обновляются не очень часто. Раз в 2-3 дня, не чаще.
|
||||
|
||||
Да, это не идеально, но это то, что есть. Мы работаем над тем, чтобы улучшить частоту их обновления.
|
||||
|
||||
### **3. Как это работает?**
|
||||
|
||||
Расширение собирает идентификатор видео, которое вы смотрите, извлекает данные об отметках «Не нравится» (и другие поля, такие как просмотры, отметки «Нравится» и т.д.) с помощью нашего API, если видео было извлечено нашим API впервые, оно использует YouTube API для получения данных, затем сохраняет данные в базе данных для кэширования (кэшируются около 2-3 дней) и архивирования и возвращает их вам. После этого расширение отображает отметки «Не нравится» вам.
|
||||
|
||||
### **4. Что произойдёт после того, как API YouTube перестанет возвращать данные о количестве отметок «Не нравится»?**
|
||||
|
||||
Внутренняя часть нашего сервера переключится на использование комбинации архивных статистик отметок «Не нравится», оценок, экстраполированных из данных о пользователях расширения, и оценок, основанных на соотношении просмотров и отметок «Нравится» для видео, чьи отметки «Не нравится» не были заархивированы, и для устаревших архивов с отметками «Не нравится».
|
||||
|
||||
## Я беспокоюсь о безопасности / конфиденциальности
|
||||
|
||||
Более подробную информацию смотрите на [этой странице](SECURITY-FAQ.md).
|
||||
@@ -1,6 +1,5 @@
|
||||
Bunu diğer dillerde okuyun: [English](FAQ.md), [русский](FAQru.md), ), [Nederlands](FAQnl.md), [Français](FAQfr.md), [українська](FAQuk.md), [Polski](FAQpl.md)
|
||||
|
||||
|
||||
# Sıkça Sorulan Sorular
|
||||
|
||||
## GitHub'da veya Discord'da bir soru sormadan önce, lütfen buraya göz atın.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Read this in other languages: [русский](SECURITY-FAQru.md), [Nederlands](SECURITY_FAQnl.md), [Français](SECURITY-FAQfr.md), [Türkçe](SECURITY-FAQtr.md), [українська](SECURITY-FAQuk.md), [Polski](SECURITY-FAQpl.md)
|
||||
|
||||
|
||||
# Security
|
||||
|
||||
### Are you tracking my viewing history?
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Read this in other languages: [English](SECURITY-FAQ.md), [русский](SECURITY-FAQru.md), [Nederlands](SECURITY_FAQnl.md), [Français](SECURITY-FAQfr.md), [Türkçe](SECURITY-FAQtr.md), [українська](SECURITY-FAQuk.md)
|
||||
|
||||
|
||||
# Security
|
||||
|
||||
### Czy śledzicie moją historię wyświetleń?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Read this in other languages: [English](SECURITY-FAQ.md), [русский](SECURITY-FAQru.md), [Nederlands](SECURITY_FAQnl.md), [Français](SECURITY-FAQfr.md), [українська](SECURITY-FAQuk.md), [Polski](SECURITY-FAQpl.md)
|
||||
Read this in other languages: [English](SECURITY-FAQ.md), [русский](SECURITY-FAQru.md), [Nederlands](SECURITY_FAQnl.md), [Français](SECURITY-FAQfr.md), [українська](SECURITY-FAQuk.md), [Polski](SECURITY-FAQpl.md)
|
||||
|
||||
# Güvenlik
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ const extConfig = {
|
||||
numberDisplayRoundDown: true, // [true*, false] Round down numbers (Show rounded down numbers)
|
||||
tooltipPercentageMode: "none", // [none*, dash_like, dash_dislike, both, only_like, only_dislike] Mode of showing percentage in like/dislike bar tooltip.
|
||||
numberDisplayReformatLikes: false, // [true, false*] Re-format like numbers (Make likes and dislikes format consistent)
|
||||
rateBarEnabled: false // [true, false*] Enables ratio bar under like/dislike buttons
|
||||
rateBarEnabled: false, // [true, false*] Enables ratio bar under like/dislike buttons
|
||||
// END USER OPTIONS
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ function getButtons() {
|
||||
let elements = document.querySelectorAll(
|
||||
isMobile
|
||||
? "ytm-like-button-renderer"
|
||||
: "#like-button > ytd-like-button-renderer"
|
||||
: "#like-button > ytd-like-button-renderer",
|
||||
);
|
||||
for (let element of elements) {
|
||||
if (isInViewport(element)) {
|
||||
@@ -85,14 +85,17 @@ function getButtons() {
|
||||
}
|
||||
if (isMobile) {
|
||||
return (
|
||||
document.querySelector(".slim-video-action-bar-actions .segmented-buttons") ??
|
||||
document.querySelector(".slim-video-action-bar-actions")
|
||||
document.querySelector(
|
||||
".slim-video-action-bar-actions .segmented-buttons",
|
||||
) ?? document.querySelector(".slim-video-action-bar-actions")
|
||||
);
|
||||
}
|
||||
if (document.getElementById("menu-container")?.offsetParent === null) {
|
||||
return (
|
||||
document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div") ??
|
||||
document.querySelector("ytd-menu-renderer.ytd-video-primary-info-renderer > div")
|
||||
document.querySelector(
|
||||
"ytd-menu-renderer.ytd-video-primary-info-renderer > div",
|
||||
)
|
||||
);
|
||||
} else {
|
||||
return document
|
||||
@@ -102,17 +105,22 @@ function getButtons() {
|
||||
}
|
||||
|
||||
function getDislikeButton() {
|
||||
if (getButtons().children[0].tagName ===
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER")
|
||||
{
|
||||
if (
|
||||
getButtons().children[0].tagName ===
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
|
||||
) {
|
||||
if (getButtons().children[0].children[1] === undefined) {
|
||||
return document.querySelector("#segmented-dislike-button");
|
||||
} else {
|
||||
return getButtons().children[0].children[1];
|
||||
}
|
||||
} else {
|
||||
if (getButtons().querySelector("segmented-like-dislike-button-view-model")) {
|
||||
const dislikeViewModel = getButtons().querySelector("dislike-button-view-model");
|
||||
if (
|
||||
getButtons().querySelector("segmented-like-dislike-button-view-model")
|
||||
) {
|
||||
const dislikeViewModel = getButtons().querySelector(
|
||||
"dislike-button-view-model",
|
||||
);
|
||||
if (!dislikeViewModel) cLog("Dislike button wasn't added to DOM yet...");
|
||||
return dislikeViewModel;
|
||||
} else {
|
||||
@@ -123,9 +131,12 @@ function getDislikeButton() {
|
||||
|
||||
function getLikeButton() {
|
||||
return getButtons().children[0].tagName ===
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
|
||||
? document.querySelector("#segmented-like-button") !== null ? document.querySelector("#segmented-like-button") : getButtons().children[0].children[0]
|
||||
: getButtons().querySelector("like-button-view-model") ?? getButtons().children[0];
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
|
||||
? document.querySelector("#segmented-like-button") !== null
|
||||
? document.querySelector("#segmented-like-button")
|
||||
: getButtons().children[0].children[0]
|
||||
: getButtons().querySelector("like-button-view-model") ??
|
||||
getButtons().children[0];
|
||||
}
|
||||
|
||||
function getLikeTextContainer() {
|
||||
@@ -136,19 +147,19 @@ function getLikeTextContainer() {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function getDislikeTextContainer() {
|
||||
const dislikeButton = getDislikeButton();
|
||||
let result =
|
||||
dislikeButton?.querySelector("#text") ??
|
||||
dislikeButton?.getElementsByTagName("yt-formatted-string")[0] ??
|
||||
dislikeButton?.querySelector("span[role='text']")
|
||||
dislikeButton?.querySelector("span[role='text']");
|
||||
if (result === null) {
|
||||
let textSpan = document.createElement("span");
|
||||
textSpan.id = "text";
|
||||
textSpan.style.marginLeft = "6px";
|
||||
dislikeButton?.querySelector("button").appendChild(textSpan);
|
||||
if (dislikeButton) dislikeButton.querySelector("button").style.width = "auto";
|
||||
if (dislikeButton)
|
||||
dislikeButton.querySelector("button").style.width = "auto";
|
||||
result = textSpan;
|
||||
}
|
||||
return result;
|
||||
@@ -158,8 +169,12 @@ function createObserver(options, callback) {
|
||||
const observerWrapper = new Object();
|
||||
observerWrapper.options = options;
|
||||
observerWrapper.observer = new MutationObserver(callback);
|
||||
observerWrapper.observe = function (element) { this.observer.observe(element, this.options); }
|
||||
observerWrapper.disconnect = function () { this.observer.disconnect(); }
|
||||
observerWrapper.observe = function (element) {
|
||||
this.observer.observe(element, this.options);
|
||||
};
|
||||
observerWrapper.disconnect = function () {
|
||||
this.observer.disconnect();
|
||||
};
|
||||
return observerWrapper;
|
||||
}
|
||||
|
||||
@@ -167,31 +182,36 @@ let shortsObserver = null;
|
||||
|
||||
if (isShorts() && !shortsObserver) {
|
||||
cLog("Initializing shorts mutation observer");
|
||||
shortsObserver = createObserver({
|
||||
attributes: true
|
||||
}, (mutationList) => {
|
||||
mutationList.forEach((mutation) => {
|
||||
if (
|
||||
mutation.type === "attributes" &&
|
||||
mutation.target.nodeName === "TP-YT-PAPER-BUTTON" &&
|
||||
mutation.target.id === "button"
|
||||
) {
|
||||
cLog("Short thumb button status changed");
|
||||
if (mutation.target.getAttribute("aria-pressed") === "true") {
|
||||
mutation.target.style.color =
|
||||
mutation.target.parentElement.parentElement.id === "like-button"
|
||||
? getColorFromTheme(true)
|
||||
: getColorFromTheme(false);
|
||||
} else {
|
||||
mutation.target.style.color = "unset";
|
||||
shortsObserver = createObserver(
|
||||
{
|
||||
attributes: true,
|
||||
},
|
||||
(mutationList) => {
|
||||
mutationList.forEach((mutation) => {
|
||||
if (
|
||||
mutation.type === "attributes" &&
|
||||
mutation.target.nodeName === "TP-YT-PAPER-BUTTON" &&
|
||||
mutation.target.id === "button"
|
||||
) {
|
||||
cLog("Short thumb button status changed");
|
||||
if (mutation.target.getAttribute("aria-pressed") === "true") {
|
||||
mutation.target.style.color =
|
||||
mutation.target.parentElement.parentElement.id === "like-button"
|
||||
? getColorFromTheme(true)
|
||||
: getColorFromTheme(false);
|
||||
} else {
|
||||
mutation.target.style.color = "unset";
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
cLog(
|
||||
"Unexpected mutation observer event: " + mutation.target + mutation.type
|
||||
);
|
||||
});
|
||||
});
|
||||
cLog(
|
||||
"Unexpected mutation observer event: " +
|
||||
mutation.target +
|
||||
mutation.type,
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function isVideoLiked() {
|
||||
@@ -263,7 +283,7 @@ function setDislikes(dislikesCount) {
|
||||
mobileDislikes = dislikesCount;
|
||||
return;
|
||||
}
|
||||
getDislikeTextContainer()?.removeAttribute('is-empty');
|
||||
getDislikeTextContainer()?.removeAttribute("is-empty");
|
||||
getDislikeTextContainer().innerText = dislikesCount;
|
||||
}
|
||||
|
||||
@@ -274,18 +294,15 @@ function getLikeCountFromButton() {
|
||||
//It should be possible to fix this function, but it's not critical to showing the dislike count.
|
||||
return false;
|
||||
}
|
||||
let likeButton = getLikeButton()
|
||||
.querySelector("yt-formatted-string#text") ??
|
||||
getLikeButton().querySelector("button");
|
||||
let likeButton =
|
||||
getLikeButton().querySelector("yt-formatted-string#text") ??
|
||||
getLikeButton().querySelector("button");
|
||||
|
||||
let likesStr = likeButton.getAttribute("aria-label")
|
||||
.replace(/\D/g, "");
|
||||
let likesStr = likeButton.getAttribute("aria-label").replace(/\D/g, "");
|
||||
return likesStr.length > 0 ? parseInt(likesStr) : false;
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
(typeof GM_addStyle != "undefined"
|
||||
@@ -339,8 +356,7 @@ function createRateBar(likes, dislikes) {
|
||||
let rateBar = document.getElementById("return-youtube-dislike-bar-container");
|
||||
|
||||
const widthPx =
|
||||
getLikeButton().clientWidth +
|
||||
(getDislikeButton()?.clientWidth ?? 52);
|
||||
getLikeButton().clientWidth + (getDislikeButton()?.clientWidth ?? 52);
|
||||
|
||||
const widthPercent =
|
||||
likes + dislikes > 0 ? (likes / (likes + dislikes)) * 100 : 50;
|
||||
@@ -397,25 +413,23 @@ function createRateBar(likes, dislikes) {
|
||||
<!--css-build:shady-->${tooltipInnerHTML}
|
||||
</tp-yt-paper-tooltip>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
);
|
||||
let descriptionAndActionsElement = document.getElementById("top-row");
|
||||
descriptionAndActionsElement.style.borderBottom =
|
||||
"1px solid var(--yt-spec-10-percent-layer)";
|
||||
descriptionAndActionsElement.style.paddingBottom = "10px";
|
||||
} else {
|
||||
document.querySelector(
|
||||
".ryd-tooltip"
|
||||
).style.width = widthPx + "px";
|
||||
document.querySelector(".ryd-tooltip").style.width = widthPx + "px";
|
||||
document.getElementById("return-youtube-dislike-bar").style.width =
|
||||
widthPercent + "%";
|
||||
|
||||
if (extConfig.coloredBar) {
|
||||
document.getElementById(
|
||||
"return-youtube-dislike-bar-container"
|
||||
"return-youtube-dislike-bar-container",
|
||||
).style.backgroundColor = getColorFromTheme(false);
|
||||
document.getElementById(
|
||||
"return-youtube-dislike-bar"
|
||||
"return-youtube-dislike-bar",
|
||||
).style.backgroundColor = getColorFromTheme(true);
|
||||
}
|
||||
}
|
||||
@@ -426,7 +440,7 @@ function setState() {
|
||||
let statsSet = false;
|
||||
|
||||
fetch(
|
||||
`https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
|
||||
`https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`,
|
||||
).then((response) => {
|
||||
response.json().then((json) => {
|
||||
if (json && !("traceId" in response) && !statsSet) {
|
||||
@@ -447,24 +461,26 @@ function setState() {
|
||||
if (isShorts()) {
|
||||
// for shorts, leave deactived buttons in default color
|
||||
const shortLikeButton = getLikeButton().querySelector(
|
||||
"tp-yt-paper-button#button"
|
||||
"tp-yt-paper-button#button",
|
||||
);
|
||||
const shortDislikeButton = dislikeButton?.querySelector(
|
||||
"tp-yt-paper-button#button"
|
||||
"tp-yt-paper-button#button",
|
||||
);
|
||||
if (shortLikeButton.getAttribute("aria-pressed") === "true") {
|
||||
shortLikeButton.style.color = getColorFromTheme(true);
|
||||
}
|
||||
if (shortDislikeButton &&
|
||||
shortDislikeButton.getAttribute("aria-pressed") === "true")
|
||||
{
|
||||
if (
|
||||
shortDislikeButton &&
|
||||
shortDislikeButton.getAttribute("aria-pressed") === "true"
|
||||
) {
|
||||
shortDislikeButton.style.color = getColorFromTheme(false);
|
||||
}
|
||||
shortsObserver.observe(shortLikeButton);
|
||||
shortsObserver.observe(shortDislikeButton);
|
||||
} else {
|
||||
getLikeButton().style.color = getColorFromTheme(true);
|
||||
if (dislikeButton) dislikeButton.style.color = getColorFromTheme(false);
|
||||
if (dislikeButton)
|
||||
dislikeButton.style.color = getColorFromTheme(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -571,7 +587,7 @@ function numberFormat(numberState) {
|
||||
numberDisplay = roundDown(numberState);
|
||||
}
|
||||
return getNumberFormatter(extConfig.numberDisplayFormat).format(
|
||||
numberDisplay
|
||||
numberDisplay,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -586,11 +602,11 @@ function getNumberFormatter(optionSelect) {
|
||||
userLocales = new URL(
|
||||
Array.from(document.querySelectorAll("head > link[rel='search']"))
|
||||
?.find((n) => n?.getAttribute("href")?.includes("?locale="))
|
||||
?.getAttribute("href")
|
||||
?.getAttribute("href"),
|
||||
)?.searchParams?.get("locale");
|
||||
} catch {
|
||||
cLog(
|
||||
"Cannot find browser locale. Use en as default for number formatting."
|
||||
"Cannot find browser locale. Use en as default for number formatting.",
|
||||
);
|
||||
userLocales = "en";
|
||||
}
|
||||
@@ -671,17 +687,22 @@ function setEventListeners(evt) {
|
||||
preNavigateLikeButton = getLikeButton();
|
||||
|
||||
if (!smartimationObserver) {
|
||||
smartimationObserver = createObserver({
|
||||
attributes: true,
|
||||
subtree: true
|
||||
}, updateDOMDislikes);
|
||||
smartimationObserver = createObserver(
|
||||
{
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
},
|
||||
updateDOMDislikes,
|
||||
);
|
||||
smartimationObserver.container = null;
|
||||
}
|
||||
|
||||
const smartimationContainer = buttons.querySelector('yt-smartimation');
|
||||
if (smartimationContainer &&
|
||||
smartimationObserver.container != smartimationContainer)
|
||||
{
|
||||
const smartimationContainer =
|
||||
buttons.querySelector("yt-smartimation");
|
||||
if (
|
||||
smartimationContainer &&
|
||||
smartimationObserver.container != smartimationContainer
|
||||
) {
|
||||
cLog("Initializing smartimation mutation observer");
|
||||
smartimationObserver.disconnect();
|
||||
smartimationObserver.observe(smartimationContainer);
|
||||
@@ -716,12 +737,12 @@ if (isMobile) {
|
||||
};
|
||||
setInterval(() => {
|
||||
const dislikeButton = getDislikeButton();
|
||||
if(dislikeButton?.querySelector(".button-renderer-text") === null){
|
||||
if (dislikeButton?.querySelector(".button-renderer-text") === null) {
|
||||
getDislikeTextContainer().innerText = mobileDislikes;
|
||||
}
|
||||
else{
|
||||
if (dislikeButton) dislikeButton.querySelector(".button-renderer-text").innerText =
|
||||
mobileDislikes;
|
||||
} else {
|
||||
if (dislikeButton)
|
||||
dislikeButton.querySelector(".button-renderer-text").innerText =
|
||||
mobileDislikes;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
@@ -1,134 +1,134 @@
|
||||
{
|
||||
"extensionName": {
|
||||
"message": "Return YouTube Dislike"
|
||||
},
|
||||
"extensionNameBeta": {
|
||||
"message": "Return YouTube Dislike Beta"
|
||||
},
|
||||
"extensionDesc": {
|
||||
"message": "Retourneert het vermogen om dislikes te zien"
|
||||
},
|
||||
"textDeveloper": {
|
||||
"message": "door Dmitry Selivanov & Gemeenschap"
|
||||
},
|
||||
"linkWebsite": {
|
||||
"message": "Website"
|
||||
},
|
||||
"linkFAQ": {
|
||||
"message": "FAQ"
|
||||
},
|
||||
"linkDonate": {
|
||||
"message": "Doneer"
|
||||
},
|
||||
"linkHelp": {
|
||||
"message": "Help"
|
||||
},
|
||||
"linkChangelog": {
|
||||
"message": "Wijzig-log"
|
||||
},
|
||||
"legendSettings": {
|
||||
"message": "Instellingen"
|
||||
},
|
||||
"textSettings": {
|
||||
"message": "Inzending voor leuk/niet leuk uitschakelen"
|
||||
},
|
||||
"textLikesDisabled": {
|
||||
"message": "Uitgeschakeld door eigenaar"
|
||||
},
|
||||
"textSettingsHover": {
|
||||
"message": "Stopt met het tellen van je leuks en niet leuks"
|
||||
},
|
||||
"textRoundingNumbers": {
|
||||
"message": "Statistieken voor leuk/niet leuk naar beneden afronden (standaard YouTube-gedrag)"
|
||||
},
|
||||
"textRoundingNumbersHover": {
|
||||
"message": "Afgeronde statistieken weergeven."
|
||||
},
|
||||
"textConsistentFormat": {
|
||||
"message": "Maak het formaat voor likes en dislikes consistent"
|
||||
},
|
||||
"textConsistentFormatHover": {
|
||||
"message": "Herformatteer als getallen."
|
||||
},
|
||||
"textNumberFormat": {
|
||||
"message": "Nummer formaat:"
|
||||
},
|
||||
"textColorizeRatioBar": {
|
||||
"message": "Verhoudingsbalk inkleuren"
|
||||
},
|
||||
"textColorizeRatioBarHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de verhoudingsbalk."
|
||||
},
|
||||
"textColorizeThumbs": {
|
||||
"message": "Duimen inkleuren"
|
||||
},
|
||||
"textColorizeThumbsHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor duimpictogrammen."
|
||||
},
|
||||
"textColorTheme": {
|
||||
"message": "Kleuren thema:"
|
||||
},
|
||||
"textColorTheme1": {
|
||||
"message": "Klassiek"
|
||||
},
|
||||
"textColorTheme2": {
|
||||
"message": "Beschikbaar"
|
||||
},
|
||||
"textColorTheme3": {
|
||||
"message": "Neon"
|
||||
},
|
||||
"textTempUnavailable": {
|
||||
"message": "Tijdelijk niet beschikbaar"
|
||||
},
|
||||
"textUpdate": {
|
||||
"message": "Update naar"
|
||||
},
|
||||
"version30installed": {
|
||||
"message": "Versie 3.0.0.13 geïnstalleerd"
|
||||
},
|
||||
"whatsnew": {
|
||||
"message": "Wat is er nieuw"
|
||||
},
|
||||
"shortsSupport": {
|
||||
"message": "YouTube Shorts Ondersteuning"
|
||||
},
|
||||
"customColors": {
|
||||
"message": "Aangepaste kleuren voor afkeerbalk en knoppen"
|
||||
},
|
||||
"customNumberFormats": {
|
||||
"message": "Aangepaste getalnotaties"
|
||||
},
|
||||
"considerDonating": {
|
||||
"message": "Het enige dat de extensie draaiende houdt, zijn uw donaties, overweeg alstublieft om het project te steunen."
|
||||
},
|
||||
"roundNumbers": {
|
||||
"message": "Afgeronde getallen weergeven"
|
||||
},
|
||||
"roundNumbersHover": {
|
||||
"message": "Rond getallen naar beneden af (standaard YouTube-gedrag)."
|
||||
},
|
||||
"reformatLikes": {
|
||||
"message": "Opnieuw formatteren zoals getallen"
|
||||
},
|
||||
"reformatLikesHover": {
|
||||
"message": "Maak het formaat voor leuk en niet leuk consistent."
|
||||
},
|
||||
"numberFormat": {
|
||||
"message": "Nummer formaat:"
|
||||
},
|
||||
"colorizeRatio": {
|
||||
"message": "Verhoudingsbalk inkleuren"
|
||||
},
|
||||
"colorizeRatioHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de verhoudingsbalk."
|
||||
},
|
||||
"colorizeThumbs": {
|
||||
"message": "Duimen inkleuren"
|
||||
},
|
||||
"colorizeThumbsHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de duimpictogrammen."
|
||||
},
|
||||
"colorTheme": {
|
||||
"message": "Kleuren thema:"
|
||||
}
|
||||
"extensionName": {
|
||||
"message": "Return YouTube Dislike"
|
||||
},
|
||||
"extensionNameBeta": {
|
||||
"message": "Return YouTube Dislike Beta"
|
||||
},
|
||||
"extensionDesc": {
|
||||
"message": "Retourneert het vermogen om dislikes te zien"
|
||||
},
|
||||
"textDeveloper": {
|
||||
"message": "door Dmitry Selivanov & Gemeenschap"
|
||||
},
|
||||
"linkWebsite": {
|
||||
"message": "Website"
|
||||
},
|
||||
"linkFAQ": {
|
||||
"message": "FAQ"
|
||||
},
|
||||
"linkDonate": {
|
||||
"message": "Doneer"
|
||||
},
|
||||
"linkHelp": {
|
||||
"message": "Help"
|
||||
},
|
||||
"linkChangelog": {
|
||||
"message": "Wijzig-log"
|
||||
},
|
||||
"legendSettings": {
|
||||
"message": "Instellingen"
|
||||
},
|
||||
"textSettings": {
|
||||
"message": "Inzending voor leuk/niet leuk uitschakelen"
|
||||
},
|
||||
"textLikesDisabled": {
|
||||
"message": "Uitgeschakeld door eigenaar"
|
||||
},
|
||||
"textSettingsHover": {
|
||||
"message": "Stopt met het tellen van je leuks en niet leuks"
|
||||
},
|
||||
"textRoundingNumbers": {
|
||||
"message": "Statistieken voor leuk/niet leuk naar beneden afronden (standaard YouTube-gedrag)"
|
||||
},
|
||||
"textRoundingNumbersHover": {
|
||||
"message": "Afgeronde statistieken weergeven."
|
||||
},
|
||||
"textConsistentFormat": {
|
||||
"message": "Maak het formaat voor likes en dislikes consistent"
|
||||
},
|
||||
"textConsistentFormatHover": {
|
||||
"message": "Herformatteer als getallen."
|
||||
},
|
||||
"textNumberFormat": {
|
||||
"message": "Nummer formaat:"
|
||||
},
|
||||
"textColorizeRatioBar": {
|
||||
"message": "Verhoudingsbalk inkleuren"
|
||||
},
|
||||
"textColorizeRatioBarHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de verhoudingsbalk."
|
||||
},
|
||||
"textColorizeThumbs": {
|
||||
"message": "Duimen inkleuren"
|
||||
},
|
||||
"textColorizeThumbsHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor duimpictogrammen."
|
||||
},
|
||||
"textColorTheme": {
|
||||
"message": "Kleuren thema:"
|
||||
},
|
||||
"textColorTheme1": {
|
||||
"message": "Klassiek"
|
||||
},
|
||||
"textColorTheme2": {
|
||||
"message": "Beschikbaar"
|
||||
},
|
||||
"textColorTheme3": {
|
||||
"message": "Neon"
|
||||
},
|
||||
"textTempUnavailable": {
|
||||
"message": "Tijdelijk niet beschikbaar"
|
||||
},
|
||||
"textUpdate": {
|
||||
"message": "Update naar"
|
||||
},
|
||||
"version30installed": {
|
||||
"message": "Versie 3.0.0.13 geïnstalleerd"
|
||||
},
|
||||
"whatsnew": {
|
||||
"message": "Wat is er nieuw"
|
||||
},
|
||||
"shortsSupport": {
|
||||
"message": "YouTube Shorts Ondersteuning"
|
||||
},
|
||||
"customColors": {
|
||||
"message": "Aangepaste kleuren voor afkeerbalk en knoppen"
|
||||
},
|
||||
"customNumberFormats": {
|
||||
"message": "Aangepaste getalnotaties"
|
||||
},
|
||||
"considerDonating": {
|
||||
"message": "Het enige dat de extensie draaiende houdt, zijn uw donaties, overweeg alstublieft om het project te steunen."
|
||||
},
|
||||
"roundNumbers": {
|
||||
"message": "Afgeronde getallen weergeven"
|
||||
},
|
||||
"roundNumbersHover": {
|
||||
"message": "Rond getallen naar beneden af (standaard YouTube-gedrag)."
|
||||
},
|
||||
"reformatLikes": {
|
||||
"message": "Opnieuw formatteren zoals getallen"
|
||||
},
|
||||
"reformatLikesHover": {
|
||||
"message": "Maak het formaat voor leuk en niet leuk consistent."
|
||||
},
|
||||
"numberFormat": {
|
||||
"message": "Nummer formaat:"
|
||||
},
|
||||
"colorizeRatio": {
|
||||
"message": "Verhoudingsbalk inkleuren"
|
||||
},
|
||||
"colorizeRatioHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de verhoudingsbalk."
|
||||
},
|
||||
"colorizeThumbs": {
|
||||
"message": "Duimen inkleuren"
|
||||
},
|
||||
"colorizeThumbsHover": {
|
||||
"message": "Gebruik aangepaste kleuren voor de duimpictogrammen."
|
||||
},
|
||||
"colorTheme": {
|
||||
"message": "Kleuren thema:"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "__MSG_extensionName__",
|
||||
"description": "__MSG_extensionDesc__",
|
||||
"default_locale": "en",
|
||||
"version": "3.0.0.12",
|
||||
"version": "3.0.0.14",
|
||||
"manifest_version": 3,
|
||||
"background": {
|
||||
"service_worker": "ryd.background.js"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "__MSG_extensionName__",
|
||||
"description": "__MSG_extensionDesc__",
|
||||
"default_locale": "en",
|
||||
"version": "3.0.0.12",
|
||||
"version": "3.0.0.14",
|
||||
"manifest_version": 2,
|
||||
"background": {
|
||||
"scripts": ["ryd.background.js"]
|
||||
@@ -34,10 +34,10 @@
|
||||
"open_in_tab": false
|
||||
}
|
||||
// uncomment this section for local storage to work in firefox locally
|
||||
// "browser_specific_settings": {
|
||||
// "gecko": {
|
||||
// "id": "addon@example.com",
|
||||
// "strict_min_version": "42.0"
|
||||
// ,"browser_specific_settings": {
|
||||
// "gecko": {
|
||||
// "id": "addon@example.com",
|
||||
// "strict_min_version": "42.0"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -74,7 +74,9 @@ button:hover {
|
||||
content: attr(data-hover);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0.1s linear, opacity 0.1s linear;
|
||||
transition:
|
||||
visibility 0.1s linear,
|
||||
opacity 0.1s linear;
|
||||
width: 250px;
|
||||
background-color: var(--secondary);
|
||||
border-radius: 0.5rem;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" />
|
||||
|
||||
@@ -80,7 +80,6 @@ document.getElementById("color_theme").addEventListener("click", (ev) => {
|
||||
chrome.storage.sync.set({ colorTheme: ev.target.value });
|
||||
});
|
||||
|
||||
|
||||
document.getElementById("number_format").addEventListener("change", (ev) => {
|
||||
chrome.storage.sync.set({ numberDisplayFormat: ev.target.value });
|
||||
});
|
||||
@@ -140,7 +139,7 @@ function initializeVersionNumber() {
|
||||
document.getElementById("ext-version").innerHTML = "v" + version;
|
||||
|
||||
fetch(
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json"
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json",
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
@@ -197,7 +196,6 @@ function initializeColorTheme() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function initializeTooltipPercentage() {
|
||||
chrome.storage.sync.get(["showTooltipPercentage"], (res) => {
|
||||
handleShowTooltipPercentageChangeEvent(res.showTooltipPercentage);
|
||||
@@ -238,7 +236,7 @@ chrome.storage.onChanged.addListener(storageChangeHandler);
|
||||
function storageChangeHandler(changes, area) {
|
||||
if (changes.disableVoteSubmission !== undefined) {
|
||||
handleDisableVoteSubmissionChangeEvent(
|
||||
changes.disableVoteSubmission.newValue
|
||||
changes.disableVoteSubmission.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.coloredThumbs !== undefined) {
|
||||
@@ -255,12 +253,12 @@ function storageChangeHandler(changes, area) {
|
||||
}
|
||||
if (changes.showTooltipPercentage !== undefined) {
|
||||
handleShowTooltipPercentageChangeEvent(
|
||||
changes.showTooltipPercentage.newValue
|
||||
changes.showTooltipPercentage.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.numberDisplayReformatLikes !== undefined) {
|
||||
handleNumberDisplayReformatLikesChangeEvent(
|
||||
changes.numberDisplayReformatLikes.newValue
|
||||
changes.numberDisplayReformatLikes.newValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -298,8 +296,6 @@ function updateColorThemePreviewContent(themeName) {
|
||||
getColorFromTheme(themeName, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function handleNumberDisplayFormatChangeEvent(value) {
|
||||
config.numberDisplayFormat = value;
|
||||
document
|
||||
@@ -336,7 +332,7 @@ function getNumberFormatter(optionSelect) {
|
||||
userLocales = new URL(
|
||||
Array.from(document.querySelectorAll("head > link[rel='search']"))
|
||||
?.find((n) => n?.getAttribute("href")?.includes("?locale="))
|
||||
?.getAttribute("href")
|
||||
?.getAttribute("href"),
|
||||
)?.searchParams?.get("locale");
|
||||
} catch {}
|
||||
|
||||
@@ -359,7 +355,7 @@ function getNumberFormatter(optionSelect) {
|
||||
{
|
||||
notation: formatterNotation,
|
||||
compactDisplay: formatterCompactDisplay,
|
||||
}
|
||||
},
|
||||
);
|
||||
return formatter;
|
||||
}
|
||||
@@ -368,7 +364,7 @@ function getNumberFormatter(optionSelect) {
|
||||
let status = document.getElementById("status");
|
||||
let serverStatus = document.getElementById("server-status");
|
||||
let resp = await fetch(
|
||||
"https://returnyoutubedislikeapi.com/votes?videoId=YbJOTdZBX1g"
|
||||
"https://returnyoutubedislikeapi.com/votes?videoId=YbJOTdZBX1g",
|
||||
);
|
||||
let result = await resp.status;
|
||||
if (result === 200) {
|
||||
|
||||
@@ -40,7 +40,7 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((response) => {
|
||||
@@ -153,7 +153,7 @@ async function register() {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
}
|
||||
},
|
||||
).then((response) => response.json());
|
||||
const solvedPuzzle = await solvePuzzle(registrationResponse);
|
||||
if (!solvedPuzzle.solution) {
|
||||
@@ -210,7 +210,7 @@ function countLeadingZeroes(uInt8View, limit) {
|
||||
|
||||
async function solvePuzzle(puzzle) {
|
||||
let challenge = Uint8Array.from(atob(puzzle.challenge), (c) =>
|
||||
c.charCodeAt(0)
|
||||
c.charCodeAt(0),
|
||||
);
|
||||
let buffer = new ArrayBuffer(20);
|
||||
let uInt8View = new Uint8Array(buffer);
|
||||
@@ -255,7 +255,7 @@ function generateUserID(length = 36) {
|
||||
function storageChangeHandler(changes, area) {
|
||||
if (changes.disableVoteSubmission !== undefined) {
|
||||
handleDisableVoteSubmissionChangeEvent(
|
||||
changes.disableVoteSubmission.newValue
|
||||
changes.disableVoteSubmission.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.coloredThumbs !== undefined) {
|
||||
@@ -272,17 +272,17 @@ function storageChangeHandler(changes, area) {
|
||||
}
|
||||
if (changes.numberDisplayReformatLikes !== undefined) {
|
||||
handleNumberDisplayReformatLikesChangeEvent(
|
||||
changes.numberDisplayReformatLikes.newValue
|
||||
changes.numberDisplayReformatLikes.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.showTooltipPercentage !== undefined) {
|
||||
handleShowTooltipPercentageChangeEvent(
|
||||
changes.showTooltipPercentage.newValue
|
||||
changes.showTooltipPercentage.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.numberDisplayReformatLikes !== undefined) {
|
||||
handleNumberDisplayReformatLikesChangeEvent(
|
||||
changes.numberDisplayReformatLikes.newValue
|
||||
changes.numberDisplayReformatLikes.newValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,11 @@
|
||||
//--- Import Button Functions ---//
|
||||
import {
|
||||
getButtons,
|
||||
|
||||
|
||||
|
||||
} from "./src/buttons";
|
||||
import { getButtons } from "./src/buttons";
|
||||
|
||||
//--- Import State Functions ---//
|
||||
import {
|
||||
isShorts,
|
||||
setInitialState,
|
||||
initExtConfig,
|
||||
} from "./src/state";
|
||||
import { isShorts, setInitialState, initExtConfig } from "./src/state";
|
||||
|
||||
//--- Import Video & Browser Functions ---//
|
||||
import {
|
||||
getBrowser,
|
||||
isVideoLoaded,
|
||||
cLog,
|
||||
} from "./src/utils";
|
||||
import { getBrowser, isVideoLoaded, cLog } from "./src/utils";
|
||||
import {
|
||||
addLikeDislikeEventListener,
|
||||
createSmartimationObserver,
|
||||
@@ -30,8 +17,8 @@ await initExtConfig();
|
||||
let jsInitChecktimer = null;
|
||||
let isSetInitialStateDone = false;
|
||||
|
||||
async function setEventListeners (evt) {
|
||||
async function checkForJS_Finish () {
|
||||
async function setEventListeners(evt) {
|
||||
async function checkForJS_Finish() {
|
||||
try {
|
||||
if (isShorts() || (getButtons()?.offsetParent && isVideoLoaded())) {
|
||||
clearInterval(jsInitChecktimer);
|
||||
|
||||
@@ -54,7 +54,7 @@ function createRateBar(likes, dislikes) {
|
||||
|
||||
if (!isShorts()) {
|
||||
if (!rateBar && !isMobile()) {
|
||||
let colorLikeStyle = " ";
|
||||
let colorLikeStyle = "";
|
||||
let colorDislikeStyle = "";
|
||||
if (extConfig.coloredBar) {
|
||||
colorLikeStyle = "; background-color: " + getColorFromTheme(true);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isMobile, isShorts, extConfig } from "./state";
|
||||
import { isInViewport, querySelector, querySelectorAll } from './utils';
|
||||
import { isInViewport, querySelector, querySelectorAll } from "./utils";
|
||||
|
||||
function getButtons() {
|
||||
//--- If Watching Youtube Shorts: ---//
|
||||
@@ -22,7 +22,7 @@ function getButtons() {
|
||||
}
|
||||
//--- If Menu Element Is Displayed: ---//
|
||||
if (querySelector(extConfig.selectors.menuContainer)?.offsetParent === null) {
|
||||
return querySelector(extConfig.selectors.buttons.regular.desktopMenu)
|
||||
return querySelector(extConfig.selectors.buttons.regular.desktopMenu);
|
||||
//--- If Menu Element Isn't Displayed: ---//
|
||||
} else {
|
||||
return querySelector(extConfig.selectors.buttons.regular.desktopNoMenu);
|
||||
@@ -31,9 +31,16 @@ function getButtons() {
|
||||
|
||||
function getLikeButton() {
|
||||
return getButtons().children[0].tagName ===
|
||||
'YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER'
|
||||
? querySelector(extConfig.selectors.buttons.likeButton.segmented) ?? querySelector(extConfig.selectors.buttons.likeButton.segmentedGetButtons, getButtons())
|
||||
: querySelector(extConfig.selectors.buttons.likeButton.notSegmented, getButtons())
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
|
||||
? querySelector(extConfig.selectors.buttons.likeButton.segmented) ??
|
||||
querySelector(
|
||||
extConfig.selectors.buttons.likeButton.segmentedGetButtons,
|
||||
getButtons(),
|
||||
)
|
||||
: querySelector(
|
||||
extConfig.selectors.buttons.likeButton.notSegmented,
|
||||
getButtons(),
|
||||
);
|
||||
}
|
||||
|
||||
function getLikeTextContainer() {
|
||||
@@ -42,21 +49,45 @@ function getLikeTextContainer() {
|
||||
|
||||
function getDislikeButton() {
|
||||
return getButtons().children[0].tagName ===
|
||||
'YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER'
|
||||
? querySelector(extConfig.selectors.buttons.dislikeButton.segmented) ?? querySelector(extConfig.selectors.buttons.dislikeButton.segmentedGetButtons, getButtons())
|
||||
: isShorts() ? querySelector(['#dislike-button'], getButtons()) : querySelector(extConfig.selectors.buttons.dislikeButton.notSegmented, getButtons())
|
||||
"YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
|
||||
? querySelector(extConfig.selectors.buttons.dislikeButton.segmented) ??
|
||||
querySelector(
|
||||
extConfig.selectors.buttons.dislikeButton.segmentedGetButtons,
|
||||
getButtons(),
|
||||
)
|
||||
: isShorts()
|
||||
? querySelector(["#dislike-button"], getButtons())
|
||||
: querySelector(
|
||||
extConfig.selectors.buttons.dislikeButton.notSegmented,
|
||||
getButtons(),
|
||||
);
|
||||
}
|
||||
|
||||
function createDislikeTextContainer() {
|
||||
const textNodeClone = (getLikeButton().querySelector('.yt-spec-button-shape-next__button-text-content') || (getLikeButton().querySelector("button > div[class*='cbox']") || (getLikeButton().querySelector('div > span[role="text"]') || document.querySelector('button > div.yt-spec-button-shape-next__button-text-content > span[role="text"]')).parentNode)).cloneNode(true);
|
||||
const textNodeClone = (
|
||||
getLikeButton().querySelector(
|
||||
".yt-spec-button-shape-next__button-text-content",
|
||||
) ||
|
||||
getLikeButton().querySelector("button > div[class*='cbox']") ||
|
||||
(
|
||||
getLikeButton().querySelector('div > span[role="text"]') ||
|
||||
document.querySelector(
|
||||
'button > div.yt-spec-button-shape-next__button-text-content > span[role="text"]',
|
||||
)
|
||||
).parentNode
|
||||
).cloneNode(true);
|
||||
const insertPreChild = getDislikeButton().querySelector("button");
|
||||
insertPreChild.insertBefore(textNodeClone, null);
|
||||
getDislikeButton().querySelector("button").classList.remove("yt-spec-button-shape-next--icon-button");
|
||||
getDislikeButton().querySelector("button").classList.add("yt-spec-button-shape-next--icon-leading");
|
||||
if(textNodeClone.querySelector("span[role='text']") === null) {
|
||||
getDislikeButton()
|
||||
.querySelector("button")
|
||||
.classList.remove("yt-spec-button-shape-next--icon-button");
|
||||
getDislikeButton()
|
||||
.querySelector("button")
|
||||
.classList.add("yt-spec-button-shape-next--icon-leading");
|
||||
if (textNodeClone.querySelector("span[role='text']") === null) {
|
||||
const span = document.createElement("span");
|
||||
span.setAttribute("role", "text");
|
||||
while(textNodeClone.firstChild){
|
||||
while (textNodeClone.firstChild) {
|
||||
textNodeClone.removeChild(textNodeClone.firstChild);
|
||||
}
|
||||
textNodeClone.appendChild(span);
|
||||
@@ -82,7 +113,7 @@ function getDislikeTextContainer() {
|
||||
function checkForSignInButton() {
|
||||
if (
|
||||
document.querySelector(
|
||||
"a[href^='https://accounts.google.com/ServiceLogin']"
|
||||
"a[href^='https://accounts.google.com/ServiceLogin']",
|
||||
)
|
||||
) {
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
import { getBrowser, getVideoId, numberFormat, cLog, createObserver } from "./utils";
|
||||
import { checkForSignInButton, getButtons, getDislikeButton, getLikeButton } from './buttons';
|
||||
import {
|
||||
getBrowser,
|
||||
getVideoId,
|
||||
numberFormat,
|
||||
cLog,
|
||||
createObserver,
|
||||
} from "./utils";
|
||||
import {
|
||||
checkForSignInButton,
|
||||
getButtons,
|
||||
getDislikeButton,
|
||||
getLikeButton,
|
||||
} from "./buttons";
|
||||
import {
|
||||
NEUTRAL_STATE,
|
||||
LIKED_STATE,
|
||||
@@ -101,15 +112,21 @@ let smartimationObserver = null;
|
||||
|
||||
function createSmartimationObserver() {
|
||||
if (!smartimationObserver) {
|
||||
smartimationObserver = createObserver({
|
||||
attributes: true,
|
||||
subtree: true
|
||||
}, updateDOMDislikes);
|
||||
smartimationObserver = createObserver(
|
||||
{
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
},
|
||||
updateDOMDislikes,
|
||||
);
|
||||
smartimationObserver.container = null;
|
||||
}
|
||||
|
||||
const smartimationContainer = getButtons().querySelector('yt-smartimation');
|
||||
if (smartimationContainer && smartimationObserver.container != smartimationContainer) {
|
||||
const smartimationContainer = getButtons().querySelector("yt-smartimation");
|
||||
if (
|
||||
smartimationContainer &&
|
||||
smartimationObserver.container != smartimationContainer
|
||||
) {
|
||||
cLog("Initializing smartimation mutation observer");
|
||||
smartimationObserver.disconnect();
|
||||
smartimationObserver.observe(smartimationContainer);
|
||||
@@ -120,7 +137,7 @@ function createSmartimationObserver() {
|
||||
function storageChangeHandler(changes, area) {
|
||||
if (changes.disableVoteSubmission !== undefined) {
|
||||
handleDisableVoteSubmissionChangeEvent(
|
||||
changes.disableVoteSubmission.newValue
|
||||
changes.disableVoteSubmission.newValue,
|
||||
);
|
||||
}
|
||||
if (changes.coloredThumbs !== undefined) {
|
||||
@@ -137,7 +154,7 @@ function storageChangeHandler(changes, area) {
|
||||
}
|
||||
if (changes.numberDisplayReformatLikes !== undefined) {
|
||||
handleNumberDisplayReformatLikesChangeEvent(
|
||||
changes.numberDisplayReformatLikes.newValue
|
||||
changes.numberDisplayReformatLikes.newValue,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ function createStarRating(rating, isMobile) {
|
||||
starSlider.setAttribute("readonly", "");
|
||||
starSlider.setAttribute(
|
||||
"style",
|
||||
`--fill:rgb(255, 215, 0);--value:${rating.toString()};};background-color: transparent;`
|
||||
`--fill:rgb(255, 215, 0);--value:${rating.toString()};};background-color: transparent;`,
|
||||
);
|
||||
starSlider.setAttribute("type", "range");
|
||||
|
||||
@@ -19,11 +19,11 @@ function createStarRating(rating, isMobile) {
|
||||
|
||||
if (isMobile) {
|
||||
YTLikeButton = document.querySelector(
|
||||
"#app > div.page-container > ytm-watch > ytm-single-column-watch-next-results-renderer > ytm-slim-video-metadata-section-renderer > ytm-slim-video-action-bar-renderer > div > ytm-slim-metadata-toggle-button-renderer:nth-child(1)"
|
||||
"#app > div.page-container > ytm-watch > ytm-single-column-watch-next-results-renderer > ytm-slim-video-metadata-section-renderer > ytm-slim-video-action-bar-renderer > div > ytm-slim-metadata-toggle-button-renderer:nth-child(1)",
|
||||
);
|
||||
} else {
|
||||
YTLikeButton = document.querySelector(
|
||||
"#top-level-buttons-computed > ytd-toggle-button-renderer:nth-child(1)"
|
||||
"#top-level-buttons-computed > ytd-toggle-button-renderer:nth-child(1)",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,8 @@ import {
|
||||
getColorFromTheme,
|
||||
querySelector,
|
||||
localize,
|
||||
createObserver
|
||||
} from './utils';
|
||||
import { createStarRating } from "./starRating";
|
||||
import { dislikeClicked } from './events';
|
||||
createObserver,
|
||||
} from "./utils";
|
||||
|
||||
//TODO: Do not duplicate here and in ryd.background.js
|
||||
const apiUrl = "https://returnyoutubedislikeapi.com";
|
||||
@@ -50,17 +48,17 @@ let extConfig = {
|
||||
likeButton: {
|
||||
segmented: [],
|
||||
segmentedGetButtons: [],
|
||||
notSegmented: []
|
||||
notSegmented: [],
|
||||
},
|
||||
dislikeButton: {
|
||||
segmented: [],
|
||||
segmentedGetButtons: [],
|
||||
notSegmented: []
|
||||
}
|
||||
notSegmented: [],
|
||||
},
|
||||
},
|
||||
menuContainer: [],
|
||||
roundedDesign: [],
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let storedData = {
|
||||
@@ -89,38 +87,43 @@ let shortsObserver = null;
|
||||
|
||||
if (isShorts() && !shortsObserver) {
|
||||
cLog("Initializing shorts mutation observer");
|
||||
shortsObserver = createObserver({
|
||||
attributes: true
|
||||
}, (mutationList) => {
|
||||
mutationList.forEach((mutation) => {
|
||||
if (
|
||||
mutation.type === "attributes" &&
|
||||
mutation.target.nodeName === "TP-YT-PAPER-BUTTON" &&
|
||||
mutation.target.id === "button"
|
||||
) {
|
||||
// cLog('Short thumb button status changed');
|
||||
if (mutation.target.getAttribute("aria-pressed") === "true") {
|
||||
mutation.target.style.color =
|
||||
mutation.target.parentElement.parentElement.id === "like-button"
|
||||
? getColorFromTheme(true)
|
||||
: getColorFromTheme(false);
|
||||
} else {
|
||||
mutation.target.style.color = "unset";
|
||||
shortsObserver = createObserver(
|
||||
{
|
||||
attributes: true,
|
||||
},
|
||||
(mutationList) => {
|
||||
mutationList.forEach((mutation) => {
|
||||
if (
|
||||
mutation.type === "attributes" &&
|
||||
mutation.target.nodeName === "TP-YT-PAPER-BUTTON" &&
|
||||
mutation.target.id === "button"
|
||||
) {
|
||||
// cLog('Short thumb button status changed');
|
||||
if (mutation.target.getAttribute("aria-pressed") === "true") {
|
||||
mutation.target.style.color =
|
||||
mutation.target.parentElement.parentElement.id === "like-button"
|
||||
? getColorFromTheme(true)
|
||||
: getColorFromTheme(false);
|
||||
} else {
|
||||
mutation.target.style.color = "unset";
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
cLog(
|
||||
"Unexpected mutation observer event: " + mutation.target + mutation.type
|
||||
);
|
||||
});
|
||||
});
|
||||
cLog(
|
||||
"Unexpected mutation observer event: " +
|
||||
mutation.target +
|
||||
mutation.type,
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function isLikesDisabled() {
|
||||
// return true if the like button's text doesn't contain any number
|
||||
if (isMobile()) {
|
||||
return /^\D*$/.test(
|
||||
getButtons().children[0].querySelector(".button-renderer-text").innerText
|
||||
getButtons().children[0].querySelector(".button-renderer-text").innerText,
|
||||
);
|
||||
}
|
||||
return /^\D*$/.test(getLikeTextContainer().innerText);
|
||||
@@ -129,19 +132,29 @@ function isLikesDisabled() {
|
||||
function isVideoLiked() {
|
||||
if (isMobile()) {
|
||||
return (
|
||||
getLikeButton().querySelector("button").getAttribute("aria-label") === "true"
|
||||
getLikeButton().querySelector("button").getAttribute("aria-label") ===
|
||||
"true"
|
||||
);
|
||||
}
|
||||
return getLikeButton().classList.contains("style-default-active") || getLikeButton().querySelector('button')?.getAttribute('aria-pressed') === 'true';
|
||||
return (
|
||||
getLikeButton().classList.contains("style-default-active") ||
|
||||
getLikeButton().querySelector("button")?.getAttribute("aria-pressed") ===
|
||||
"true"
|
||||
);
|
||||
}
|
||||
|
||||
function isVideoDisliked() {
|
||||
if (isMobile()) {
|
||||
return (
|
||||
getDislikeButton().querySelector("button").getAttribute("aria-label") === "true"
|
||||
getDislikeButton().querySelector("button").getAttribute("aria-label") ===
|
||||
"true"
|
||||
);
|
||||
}
|
||||
return getDislikeButton().classList.contains("style-default-active") || getDislikeButton().querySelector('button')?.getAttribute('aria-pressed') === 'true';
|
||||
return (
|
||||
getDislikeButton().classList.contains("style-default-active") ||
|
||||
getDislikeButton().querySelector("button")?.getAttribute("aria-pressed") ===
|
||||
"true"
|
||||
);
|
||||
}
|
||||
|
||||
function getState(storedData) {
|
||||
@@ -156,27 +169,26 @@ function getState(storedData) {
|
||||
|
||||
//--- Sets The Likes And Dislikes Values ---//
|
||||
function setLikes(likesCount) {
|
||||
cLog(`SET likes ${likesCount}`)
|
||||
cLog(`SET likes ${likesCount}`);
|
||||
getLikeTextContainer().innerText = likesCount;
|
||||
}
|
||||
|
||||
function setDislikes(dislikesCount) {
|
||||
cLog(`SET dislikes ${dislikesCount}`)
|
||||
cLog(`SET dislikes ${dislikesCount}`);
|
||||
getDislikeTextContainer()?.removeAttribute("is-empty");
|
||||
if (!isLikesDisabled()) {
|
||||
if (isMobile()) {
|
||||
getButtons().children[1].querySelector(
|
||||
".button-renderer-text"
|
||||
".button-renderer-text",
|
||||
).innerText = dislikesCount;
|
||||
return;
|
||||
}
|
||||
getDislikeTextContainer().innerText = dislikesCount;
|
||||
|
||||
} else {
|
||||
cLog("likes count disabled by creator");
|
||||
if (isMobile()) {
|
||||
getButtons().children[1].querySelector(
|
||||
".button-renderer-text"
|
||||
".button-renderer-text",
|
||||
).innerText = localize("TextLikesDisabled");
|
||||
return;
|
||||
}
|
||||
@@ -192,12 +204,11 @@ function getLikeCountFromButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
let likeButton = getLikeButton()
|
||||
.querySelector("yt-formatted-string#text") ??
|
||||
getLikeButton().querySelector("button");
|
||||
let likeButton =
|
||||
getLikeButton().querySelector("yt-formatted-string#text") ??
|
||||
getLikeButton().querySelector("button");
|
||||
|
||||
let likesStr = likeButton.getAttribute("aria-label")
|
||||
.replace(/\D/g, "");
|
||||
let likesStr = likeButton.getAttribute("aria-label").replace(/\D/g, "");
|
||||
return likesStr.length > 0 ? parseInt(likesStr) : false;
|
||||
} catch {
|
||||
return false;
|
||||
@@ -220,10 +231,10 @@ function processResponse(response, storedData) {
|
||||
if (isShorts()) {
|
||||
// for shorts, leave deactivated buttons in default color
|
||||
let shortLikeButton = getLikeButton().querySelector(
|
||||
"tp-yt-paper-button#button"
|
||||
"tp-yt-paper-button#button",
|
||||
);
|
||||
let shortDislikeButton = getDislikeButton().querySelector(
|
||||
"tp-yt-paper-button#button"
|
||||
"tp-yt-paper-button#button",
|
||||
);
|
||||
if (shortLikeButton.getAttribute("aria-pressed") === "true") {
|
||||
shortLikeButton.style.color = getColorFromTheme(true);
|
||||
@@ -244,17 +255,15 @@ function processResponse(response, storedData) {
|
||||
|
||||
// Tells the user if the API is down
|
||||
function displayError(error) {
|
||||
getDislikeTextContainer().innerText = localize(
|
||||
"textTempUnavailable"
|
||||
);
|
||||
getDislikeTextContainer().innerText = localize("textTempUnavailable");
|
||||
}
|
||||
|
||||
async function setState(storedData) {
|
||||
storedData.previousState = isVideoDisliked()
|
||||
? DISLIKED_STATE
|
||||
: isVideoLiked()
|
||||
? LIKED_STATE
|
||||
: NEUTRAL_STATE;
|
||||
? LIKED_STATE
|
||||
: NEUTRAL_STATE;
|
||||
let statsSet = false;
|
||||
cLog("Video is loaded. Adding buttons...");
|
||||
|
||||
@@ -268,7 +277,7 @@ async function setState(storedData) {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
.then((response) => {
|
||||
if (!response.ok) displayError(response.error);
|
||||
@@ -283,11 +292,11 @@ async function setState(storedData) {
|
||||
}
|
||||
}
|
||||
|
||||
async function setInitialState () {
|
||||
async function setInitialState() {
|
||||
await setState(storedData);
|
||||
}
|
||||
|
||||
async function initExtConfig () {
|
||||
async function initExtConfig() {
|
||||
initializeDisableVoteSubmission();
|
||||
initializeColoredThumbs();
|
||||
initializeColoredBar();
|
||||
@@ -299,16 +308,18 @@ async function initExtConfig () {
|
||||
await initializeSelectors();
|
||||
}
|
||||
|
||||
async function initializeSelectors () {
|
||||
console.log("initializing selectors")
|
||||
async function initializeSelectors() {
|
||||
console.log("initializing selectors");
|
||||
let result = await fetch(`${apiUrl}/configs/selectors`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
}
|
||||
}).then((response) => response.json()).catch((error) => {});
|
||||
},
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.catch((error) => {});
|
||||
extConfig.selectors = result ?? extConfig.selectors;
|
||||
console.log(result)
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
function initializeDisableVoteSubmission() {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { extConfig } from "./state";
|
||||
|
||||
function numberFormat(numberState) {
|
||||
return getNumberFormatter(extConfig.numberDisplayFormat).format(
|
||||
numberState
|
||||
);
|
||||
return getNumberFormatter(extConfig.numberDisplayFormat).format(numberState);
|
||||
}
|
||||
|
||||
function getNumberFormatter(optionSelect) {
|
||||
@@ -17,11 +15,11 @@ function getNumberFormatter(optionSelect) {
|
||||
userLocales = new URL(
|
||||
Array.from(document.querySelectorAll("head > link[rel='search']"))
|
||||
?.find((n) => n?.getAttribute("href")?.includes("?locale="))
|
||||
?.getAttribute("href")
|
||||
?.getAttribute("href"),
|
||||
)?.searchParams?.get("locale");
|
||||
} catch {
|
||||
cLog(
|
||||
"Cannot find browser locale. Use en as default for number formatting."
|
||||
"Cannot find browser locale. Use en as default for number formatting.",
|
||||
);
|
||||
userLocales = "en";
|
||||
}
|
||||
@@ -168,8 +166,12 @@ function createObserver(options, callback) {
|
||||
const observerWrapper = new Object();
|
||||
observerWrapper.options = options;
|
||||
observerWrapper.observer = new MutationObserver(callback);
|
||||
observerWrapper.observe = function (element) { this.observer.observe(element, this.options); }
|
||||
observerWrapper.disconnect = function () { this.observer.disconnect(); }
|
||||
observerWrapper.observe = function (element) {
|
||||
this.observer.observe(element, this.options);
|
||||
};
|
||||
observerWrapper.disconnect = function () {
|
||||
this.observer.disconnect();
|
||||
};
|
||||
return observerWrapper;
|
||||
}
|
||||
|
||||
@@ -184,5 +186,5 @@ export {
|
||||
localize,
|
||||
querySelector,
|
||||
querySelectorAll,
|
||||
createObserver
|
||||
createObserver,
|
||||
};
|
||||
@@ -7,11 +7,8 @@
|
||||
[](https://discord.gg/UMxyMmCgfF)
|
||||
[](https://github.com/Anarios/return-youtube-dislike/blob/main/LICENSE)
|
||||
|
||||
|
||||
Read this in other languages: [русский](READMEru.md), [Español](READMEes.md), [Nederlands](READMEnl.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Lesen sie dies in anderen Sprachen: [English](README.md), [Español](READMEes.md), [русский](READMEru.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Leer en otros idiomas: [English](README.md), [русский](READMEru.md), [Nederlands](READMEnl.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
+1
-2
@@ -7,8 +7,7 @@
|
||||
[](https://discord.gg/UMxyMmCgfF)
|
||||
[](LICENSE)
|
||||
|
||||
Lisez ceci dans d'autres langues : [English](README.md), [русский](READMEru.md), [Español](READMEes.md), [Nederlands](READMEnl.md),[日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
Lisez ceci dans d'autres langues : [English](README.md), [русский](READMEru.md), [Español](READMEes.md), [Nederlands](READMEnl.md),[日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Διαθέσιμο στις παρακάτω γλώσσες: [English](README.md), [русский](READMEru.md), [Español](READMEes.md), [Nederlands](READMEnl.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
別の言語: [English](README.md), [русский](READMEru.md), [Español](READMEes.md), [Nederlands](READMEnl.md), [Français](READMEfr.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Lees dit in andere talen: [English](README.md), [Español](READMEes.md), [русский](READMEru.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Прочитать на других языках: [English](README.md), [Español](READMEes.md), [Nederlands](READMEnl.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Bunu diğer dillerde okuyun: [English](README.md), [русский](READMEru.md), [Español](READMEes.md), [Français](READMEfr.md), [Nederlands](READMEnl.md), [日本語](READMEja.md), [українська](READMEuk.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# YouTube Dislike Sayısını Geri Getir
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
Read this in other languages: [English](README.md), [Español](READMEes.md), [русский](READMEru.md), [Français](READMEfr.md), [日本語](READMEja.md), [Türkçe](READMEtr.md), [Deutsch](READMEde.md), [Ελληνικά](READMEgr.md), [Svenska](READMEsv.md), [中文](READMEcn.md), [Polski](READMEpl.md)
|
||||
|
||||
|
||||
# Return YouTube Dislike
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -54,8 +54,9 @@ export default {
|
||||
headers: "En-têtes (headers) : ",
|
||||
response: "Réponse : ",
|
||||
error1:
|
||||
'Si aucune vidéo YouTube n\'a cet ID, le code d\'erreur 404 "Not Found" sera retourné',
|
||||
error2: 'Un ID YouTube invalide renverra le code d\'erreur *400* "Bad Request"',
|
||||
"Si aucune vidéo YouTube n'a cet ID, le code d'erreur 404 \"Not Found\" sera retourné",
|
||||
error2:
|
||||
'Un ID YouTube invalide renverra le code d\'erreur *400* "Bad Request"',
|
||||
},
|
||||
},
|
||||
help: {
|
||||
|
||||
@@ -14,7 +14,8 @@ export default {
|
||||
title: "플랫폼 선택",
|
||||
subtitle: "파이어폭스와 모든 크로미엄 기반 브라우저에서 사용 가능",
|
||||
title2: "다른 플랫폼",
|
||||
subtitle2: "당신의 브라우저가 아직 지원하지 않는 경우, 이 유저스크립트를 시도할 수 있습니다",
|
||||
subtitle2:
|
||||
"당신의 브라우저가 아직 지원하지 않는 경우, 이 유저스크립트를 시도할 수 있습니다",
|
||||
title3: "서드파티 구현",
|
||||
subtitle3: "우리 측의 책임이 없으며, 사용자의 책임하에 사용하십시오",
|
||||
},
|
||||
@@ -49,9 +50,9 @@ export default {
|
||||
method: "요청 메소드: ",
|
||||
headers: "헤더: ",
|
||||
response: "응답: ",
|
||||
error1: '유효하지 않은 유튜브 ID는 상태 코드 404 "Not Found"를 리턴합니다',
|
||||
error2:
|
||||
'잘못된 포멧의 유튜브 ID는 400 "Bad Request"를 리턴합니다',
|
||||
error1:
|
||||
'유효하지 않은 유튜브 ID는 상태 코드 404 "Not Found"를 리턴합니다',
|
||||
error2: '잘못된 포멧의 유튜브 ID는 400 "Bad Request"를 리턴합니다',
|
||||
},
|
||||
},
|
||||
help: {
|
||||
@@ -63,7 +64,8 @@ export default {
|
||||
"확장 프로그램을 제거하고 재설치한 다음, 브라우저를 재시작 하세요(모든 활성 창을 말하며, 단지 하나의 탭을 말하는 것이 아닙니다)",
|
||||
bullet3: "이 링크가 열리는지 확인하세요: ",
|
||||
bullet31: "평문이 표시되어야 합니다: ",
|
||||
bullet4: "위의 내용이 도움이 되지 않는 경우, 우리의 디스코드에서 다음과 같은 채널에서 당신의 문제를 보고하세요.",
|
||||
bullet4:
|
||||
"위의 내용이 도움이 되지 않는 경우, 우리의 디스코드에서 다음과 같은 채널에서 당신의 문제를 보고하세요.",
|
||||
bullet41: "디스코드: ",
|
||||
bullet4a: "운영체제, 브라우저 이름과 브라우저 버전을 우리한테 말해주세요",
|
||||
bullet4b:
|
||||
@@ -78,7 +80,8 @@ export default {
|
||||
faq: {
|
||||
name: "FAQ",
|
||||
title: "자주 묻는 질문",
|
||||
subtitle: "여전히 의문점이 있으신가요? 우리의 디스코드에 무료로 가입하세요!",
|
||||
subtitle:
|
||||
"여전히 의문점이 있으신가요? 우리의 디스코드에 무료로 가입하세요!",
|
||||
bullet1: "확장 프로그램은 어디에서 데이터를 가져옵니까?",
|
||||
bullet1text:
|
||||
"공식 유튜브 싫어요 API가 닫히기 전에 보환된 데이터와 확장 프로그램 사용자 행동을 추정한 값의 조합입니다",
|
||||
|
||||
+14
-7
@@ -5,7 +5,8 @@ export default {
|
||||
home: {
|
||||
name: "Home",
|
||||
title: "Return YouTube Dislike",
|
||||
subtitle: "Browser-extensie en een API die je antipathieën op YouTube laat zien",
|
||||
subtitle:
|
||||
"Browser-extensie en een API die je antipathieën op YouTube laat zien",
|
||||
ukraine: "Support Ukraine",
|
||||
sponsors: "Sponsors",
|
||||
},
|
||||
@@ -14,7 +15,8 @@ export default {
|
||||
title: "Kies je platform",
|
||||
subtitle: "Beschikbaar voor Firefox en alle Chromium-browsers",
|
||||
title2: "Andere Platformen",
|
||||
subtitle2: "Als uw browser nog niet wordt ondersteund, probeer dan dit UserScript",
|
||||
subtitle2:
|
||||
"Als uw browser nog niet wordt ondersteund, probeer dan dit UserScript",
|
||||
title3: "Implementaties van derden",
|
||||
subtitle3: "Geen aansprakelijkheid aan onze kant, gebruik op eigen risico",
|
||||
},
|
||||
@@ -43,13 +45,15 @@ export default {
|
||||
},
|
||||
fetching: {
|
||||
title: "Basiscursus ophalen",
|
||||
subtitle: "Voorbeeld om stemmen te krijgen voor een bepaalde YouTube-video-ID: ",
|
||||
subtitle:
|
||||
"Voorbeeld om stemmen te krijgen voor een bepaalde YouTube-video-ID: ",
|
||||
title2: "Voorbeeld aanvraag: ",
|
||||
url: "Verzoek-URL: ",
|
||||
method: "Verzoekmethode:: ",
|
||||
headers: "Koppen: ",
|
||||
response: "Antwoord: ",
|
||||
error1: 'Een ongeldige YouTube-ID retourneert statuscode 404 "Niet gevonden"',
|
||||
error1:
|
||||
'Een ongeldige YouTube-ID retourneert statuscode 404 "Niet gevonden"',
|
||||
error2:
|
||||
'Een onjuist opgemaakte YouTube-ID retourneert 400 "Slecht verzoek"',
|
||||
},
|
||||
@@ -57,7 +61,8 @@ export default {
|
||||
help: {
|
||||
name: "Help",
|
||||
title: "Probleemoplossen",
|
||||
bullet1: "Zorg ervoor dat u de nieuwste versie van de extensie hebt geïnstalleerd, ",
|
||||
bullet1:
|
||||
"Zorg ervoor dat u de nieuwste versie van de extensie hebt geïnstalleerd, ",
|
||||
bullet11: "direct",
|
||||
bullet2:
|
||||
"Probeer de extensie te verwijderen en opnieuw te installeren, en start vervolgens de browser opnieuw (alle actieve vensters, niet slechts één tabblad)",
|
||||
@@ -78,7 +83,8 @@ export default {
|
||||
faq: {
|
||||
name: "FAQ",
|
||||
title: "Veel Gestelde Vragen",
|
||||
subtitle: "Heeft u nog vragen? Voel je vrij om lid te worden van onze Discord!",
|
||||
subtitle:
|
||||
"Heeft u nog vragen? Voel je vrij om lid te worden van onze Discord!",
|
||||
bullet1: "Waar haalt de extensie zijn gegevens vandaan?",
|
||||
bullet1text:
|
||||
"Een combinatie van gearchiveerde gegevens van voordat de officiële YouTube-dislike-API werd afgesloten, en geëxtrapoleerd gebruikersgedrag van extensies.",
|
||||
@@ -97,7 +103,8 @@ export default {
|
||||
bullet6: "Hoe werkt de API/Backend?",
|
||||
bullet6text:
|
||||
"De backend gebruikt gearchiveerde gegevens van toen de youtube-api nog steeds het aantal dislikes retourneerde, extensiegebruikers zoals het aantal likes/dislikes en extrapolatie. In de nabije toekomst zullen we het voor makers van inhoud mogelijk maken om eenvoudig en veilig hun afkeuren-aantal in te dienen en we zullen de gearchiveerde gegevens van ArchiveTeam (4,56 miljard video's) toevoegen aan onze huidige database. U kunt ook een video over het onderwerp bekijken.",
|
||||
bullet7: "Waarom wordt bij het aantal dislikes 'DISLIKES DISABLED' weergegeven?",
|
||||
bullet7:
|
||||
"Waarom wordt bij het aantal dislikes 'DISLIKES DISABLED' weergegeven?",
|
||||
bullet7text:
|
||||
"Soms kan een recent geüploade video 'DISLIKES UITGESCHAKELD' weergeven, zelfs als de maker dit niet heeft uitgeschakeld. Dit komt door de manier waarop we detecteren of dislikes zijn uitgeschakeld, het zou binnen een paar uur moeten verdwijnen of door de video leuk of niet leuk te vinden en de pagina vernieuwen (hopelijk).",
|
||||
},
|
||||
|
||||
+12
-6
@@ -5,7 +5,8 @@ export default {
|
||||
home: {
|
||||
name: "Strona główna",
|
||||
title: "Return YouTube Dislike",
|
||||
subtitle: "Rozszerzenie do przeglądarki i API pokazujące ilość łapek w dół na YouTube",
|
||||
subtitle:
|
||||
"Rozszerzenie do przeglądarki i API pokazujące ilość łapek w dół na YouTube",
|
||||
ukraine: "Wesprzyj Ukrainę",
|
||||
sponsors: "Sponsorzy",
|
||||
},
|
||||
@@ -14,9 +15,11 @@ export default {
|
||||
title: "Wybierz swoją platformę",
|
||||
subtitle: "Dostępne dla Firefox i wszystkich przeglądarek Chromium",
|
||||
title2: "Inne platformy",
|
||||
subtitle2: "Jeżeli twoja przeglądarka nie jest wspierana, wypróbuj ten UserScript",
|
||||
subtitle2:
|
||||
"Jeżeli twoja przeglądarka nie jest wspierana, wypróbuj ten UserScript",
|
||||
title3: "Implementacje od stron trzecich",
|
||||
subtitle3: "Nie ponosimy za nie odpowiedzialności, używasz na własne ryzyko",
|
||||
subtitle3:
|
||||
"Nie ponosimy za nie odpowiedzialności, używasz na własne ryzyko",
|
||||
},
|
||||
api: {
|
||||
name: "API",
|
||||
@@ -43,7 +46,8 @@ export default {
|
||||
},
|
||||
fetching: {
|
||||
title: "Poradnik - Podstawowe pobieranie",
|
||||
subtitle: "Przykład pozwalający otrzymać głosy z danego ID filmu na YouTube: ",
|
||||
subtitle:
|
||||
"Przykład pozwalający otrzymać głosy z danego ID filmu na YouTube: ",
|
||||
title2: "Przykładowe żądanie: ",
|
||||
url: "URL żądania: ",
|
||||
method: "Metoda żądania: ",
|
||||
@@ -57,7 +61,8 @@ export default {
|
||||
help: {
|
||||
name: "Pomoc",
|
||||
title: "Rozwiązywanie problemów",
|
||||
bullet1: "Upewnij się, że masz zainstalowaną najnowszą wersję rozszerzenia, ",
|
||||
bullet1:
|
||||
"Upewnij się, że masz zainstalowaną najnowszą wersję rozszerzenia, ",
|
||||
bullet11: "obecnie.",
|
||||
bullet2:
|
||||
"Spróbuj usunąć rozszerzenie i zainstalować je ponownie, a następnie zrestartować przeglądarkę (wszystkie aktywne okna, nie tylko jedną kartę)",
|
||||
@@ -65,7 +70,8 @@ export default {
|
||||
bullet31: "powinno się wyświetlić w czystym tekście: ",
|
||||
bullet4: "Jeśli nic powyżej nie pomoże - zgłoś problem na",
|
||||
bullet41: "na naszym",
|
||||
bullet4a: "Powiedz z jakiego systemu operacyjnego korzystasz, oraz podaj nazwę i wersję przeglądarki",
|
||||
bullet4a:
|
||||
"Powiedz z jakiego systemu operacyjnego korzystasz, oraz podaj nazwę i wersję przeglądarki",
|
||||
bullet4b:
|
||||
"Wykonaj zrzut ekranu problematycznej strony (tj. strony filmu na YouTube) z otwartą konsolą (naciśnij ",
|
||||
bullet4b1: ") - przykładowy zrzut poniżej.",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { sv_SE } from "vuetify/src/locale";
|
||||
import { sv } from "vuetify/src/locale";
|
||||
|
||||
export default {
|
||||
...sv_SE,
|
||||
...sv,
|
||||
home: {
|
||||
name: "Hem",
|
||||
title: "Return YouTube Dislike",
|
||||
subtitle: "Webbläsartillägg och ett API som visar antalet ogilla på Youtube",
|
||||
subtitle:
|
||||
"Webbläsartillägg och ett API som visar antalet ogilla på Youtube",
|
||||
ukraine: "Stöd Ukraina",
|
||||
sponsors: "Sponsorer",
|
||||
},
|
||||
@@ -43,7 +44,8 @@ export default {
|
||||
},
|
||||
fetching: {
|
||||
title: "Grundläggande handledning för hämtning",
|
||||
subtitle: "Exempel för att hämta röster för ett bestämt YouTubevideo-ID: ",
|
||||
subtitle:
|
||||
"Exempel för att hämta röster för ett bestämt YouTubevideo-ID: ",
|
||||
title2: "Example Request: ",
|
||||
url: "Request URL: ",
|
||||
method: "Request Method: ",
|
||||
@@ -57,7 +59,8 @@ export default {
|
||||
help: {
|
||||
name: "Hjälp",
|
||||
title: "Felsökning",
|
||||
bullet1: "Se till att du har den senaste versionen av tillägget installerat, ",
|
||||
bullet1:
|
||||
"Se till att du har den senaste versionen av tillägget installerat, ",
|
||||
bullet11: "just nu",
|
||||
bullet2:
|
||||
"Försök att avinstallera tillägget och installera det igen, starta sedan om webbläsaren (alla aktiva fönster, inte bara en flik)",
|
||||
@@ -65,7 +68,8 @@ export default {
|
||||
bullet31: "du bör se vanlig text: ",
|
||||
bullet4: "Om inget av ovanstående hjälper - rapportera ditt problem i",
|
||||
bullet41: "i vår",
|
||||
bullet4a: "Tala om för oss ditt operativsystem, webbläsarnamn och webbläsarversion",
|
||||
bullet4a:
|
||||
"Tala om för oss ditt operativsystem, webbläsarnamn och webbläsarversion",
|
||||
bullet4b:
|
||||
"Ta en skärmdump av sidan du har problem med (t.ex en youtube-videosida) med konsolfönstret öppet (tryck ",
|
||||
bullet4b1: ") - exempel på skärmdump nedan.",
|
||||
@@ -97,7 +101,7 @@ export default {
|
||||
bullet6: "Hur fungerar API/Backend?",
|
||||
bullet6text:
|
||||
"Backend använder arkiverad data från när YouTubes API fortfarande returnerade antalet ogilla. Inom en snar framtid kommer vi att tillåta innehållsskapare att enkelt och säkert skicka in sina ogilla och vi kommer att lägga till ArchiveTeams arkiverade data (4,56 miljarder videor) i vår nuvarande databas. Du kan också se en video om ämnet.",
|
||||
bullet7: "Varför visar antalet ogilla "OGILLA ÄR INAKTIVERAT"?",
|
||||
bullet7: "Varför visar antalet ogilla 'OGILLA ÄR INAKTIVERAT'?",
|
||||
bullet7text:
|
||||
"I bland kan en nyligen uppladdad video visa 'OGILLA ÄR INAKTIVERAT' även om ägaren inte har inaktiverat den. Detta beror på hur informationen om ogilla är inaktiverat hämtas ut. Det bör försvinna inom några timmar eller genom att gilla eller ogilla videon och uppdatera sidan (förhoppningsvis).",
|
||||
},
|
||||
+17
-10
@@ -5,7 +5,8 @@ export default {
|
||||
home: {
|
||||
name: "Ana Sayfa",
|
||||
title: "YouTube Dislike Sayısını Geri Getir",
|
||||
subtitle: "YouTube'daki dislike sayılarınızı geri getiren bir tarayıcı uzantısı ve API",
|
||||
subtitle:
|
||||
"YouTube'daki dislike sayılarınızı geri getiren bir tarayıcı uzantısı ve API",
|
||||
ukraine: "Ukrayna'ya Destek Ol",
|
||||
sponsors: "Sponsorlar",
|
||||
},
|
||||
@@ -14,9 +15,11 @@ export default {
|
||||
title: "Platformunuzu Seçin",
|
||||
subtitle: "Firefox ve bütün Chromium tabanlı tarayıcılarda kullanılabilir",
|
||||
title2: "Diğer Platformlar",
|
||||
subtitle2: "Tarayıcınız henüz desteklenmiyorsa UserScript yöntemini deneyin",
|
||||
subtitle2:
|
||||
"Tarayıcınız henüz desteklenmiyorsa UserScript yöntemini deneyin",
|
||||
title3: "Üçüncü Parti Uygulamalar",
|
||||
subtitle3: "Riski tamamen size aittir, bizim tarafımızda sorumluluk kabul edilmemektedir",
|
||||
subtitle3:
|
||||
"Riski tamamen size aittir, bizim tarafımızda sorumluluk kabul edilmemektedir",
|
||||
},
|
||||
api: {
|
||||
name: "API",
|
||||
@@ -43,7 +46,8 @@ export default {
|
||||
},
|
||||
fetching: {
|
||||
title: "Temel Veri Alma Eğitimi",
|
||||
subtitle: "Belirli bir YouTube ID'sinin oylamalarını elde etmek için bir örnek: ",
|
||||
subtitle:
|
||||
"Belirli bir YouTube ID'sinin oylamalarını elde etmek için bir örnek: ",
|
||||
title2: "Örnek İstek: ",
|
||||
url: "İstek URL'si: ",
|
||||
method: "İstek Yöntemi: ",
|
||||
@@ -64,11 +68,13 @@ export default {
|
||||
bullet3: "Şu bağlantıyı açtığınızdan emin olun: ",
|
||||
bullet31: "şöyle bir düz metin görmelisiniz: ",
|
||||
bullet4: "Yukarıdakiler yardımcı olmadıysa - Discord sunucumuzdaki ",
|
||||
bullet41: " kanalından problemi bildirin (İngilizce bir şekilde) Discord sunucumuz: ",
|
||||
bullet4a: "Bize İşletim Sisteminizi, Tarayıcı Adınızı ve Tarayıcı Sürümünüzü söyleyin",
|
||||
bullet4b:
|
||||
"Konsol açıkken (açmak için ",
|
||||
bullet4b1: " tuşuna basın) sorunu yaşadığınız sayfanın ekran görüntüsünü alın (yani YouTube watch sayfasının) - Ekran görüntüsü örneği aşağıdadır.",
|
||||
bullet41:
|
||||
" kanalından problemi bildirin (İngilizce bir şekilde) Discord sunucumuz: ",
|
||||
bullet4a:
|
||||
"Bize İşletim Sisteminizi, Tarayıcı Adınızı ve Tarayıcı Sürümünüzü söyleyin",
|
||||
bullet4b: "Konsol açıkken (açmak için ",
|
||||
bullet4b1:
|
||||
" tuşuna basın) sorunu yaşadığınız sayfanın ekran görüntüsünü alın (yani YouTube watch sayfasının) - Ekran görüntüsü örneği aşağıdadır.",
|
||||
bullet4c:
|
||||
"Uzantı yüklüyken tarayıcınızın uzantılar sayfasının ekran görüntüsünü alın.",
|
||||
bullet4c1: "Uzantıları görmek için şu linki adres çubuğuna yapıştırın: ",
|
||||
@@ -78,7 +84,8 @@ export default {
|
||||
faq: {
|
||||
name: "SSS",
|
||||
title: "Sıkça Sorulan Sorular",
|
||||
subtitle: "Hâlâ sorun mu yaşıyorsunuz? Discord sunucumuza katılmaktan çekinmeyin! (İngilizce)",
|
||||
subtitle:
|
||||
"Hâlâ sorun mu yaşıyorsunuz? Discord sunucumuza katılmaktan çekinmeyin! (İngilizce)",
|
||||
bullet1: "Uzantı, verileri nereden alıyor?",
|
||||
bullet1text:
|
||||
"Resmî YouTube dislike sayısı API'si kapatılmadan önceki arşivlenmiş verilerden ve tahmin edilen uzantı kullanıcısı davranışının bir birleşimiyle.",
|
||||
|
||||
+12
-6
@@ -5,7 +5,8 @@ export default {
|
||||
home: {
|
||||
name: "Головна",
|
||||
title: "Return YouTube Dislike",
|
||||
subtitle: "Браузерне розширення та API, що дозволяє вам бачити відмітки «Не подобається» на YouTube",
|
||||
subtitle:
|
||||
"Браузерне розширення та API, що дозволяє вам бачити відмітки «Не подобається» на YouTube",
|
||||
ukraine: "Підтримати Україну",
|
||||
sponsors: "Спонсори",
|
||||
},
|
||||
@@ -16,7 +17,8 @@ export default {
|
||||
title2: "Інші платформи",
|
||||
subtitle2: "Якщо ваш браузер не підтримується, спробуйте цей UserScript",
|
||||
title3: "Стороннє ПЗ",
|
||||
subtitle3: "Ми не маємо відношення до цього, використовуйте на свій страх і ризик",
|
||||
subtitle3:
|
||||
"Ми не маємо відношення до цього, використовуйте на свій страх і ризик",
|
||||
},
|
||||
api: {
|
||||
name: "API",
|
||||
@@ -57,13 +59,15 @@ export default {
|
||||
help: {
|
||||
name: "Допомога",
|
||||
title: "Усунення несправностей",
|
||||
bullet1: "Переконайтеся, що у вас встановлена остання версія розширення, наразі це - ",
|
||||
bullet1:
|
||||
"Переконайтеся, що у вас встановлена остання версія розширення, наразі це - ",
|
||||
bullet11: "",
|
||||
bullet2:
|
||||
"Спробуйте видалити розширення і встановити його знову, а потім перезавантажте браузер (усі активні вікна, а не лише одну вкладку).",
|
||||
bullet3: "Переконайтеся, що наступне посилання відкривається: ",
|
||||
bullet31: "і ви бачите там цей текст: ",
|
||||
bullet4: "Якщо нічого з перерахованого вище не допомогло - повідомте про проблему в каналі",
|
||||
bullet4:
|
||||
"Якщо нічого з перерахованого вище не допомогло - повідомте про проблему в каналі",
|
||||
bullet41: "у нашому",
|
||||
bullet4a: "Повідомте нам вашу операційну систему, назву та версію браузера",
|
||||
bullet4b:
|
||||
@@ -78,7 +82,8 @@ export default {
|
||||
faq: {
|
||||
name: "ЧаПи",
|
||||
title: "Часті питання",
|
||||
subtitle: "Залишилися питання? Не соромтеся приєднуватися до нашого Discord!",
|
||||
subtitle:
|
||||
"Залишилися питання? Не соромтеся приєднуватися до нашого Discord!",
|
||||
bullet1: "Звідки розширення отримує дані?",
|
||||
bullet1text:
|
||||
"Комбінація архівних даних, отриманих до закриття офіційного API відміток «Не подобається» на YouTube та екстрапольованої поведінки користувачів розширення.",
|
||||
@@ -97,7 +102,8 @@ export default {
|
||||
bullet6: "Як працює API/серверна сторона?",
|
||||
bullet6text:
|
||||
"Серверна частина використовує архівні дані з тих пір, доки YouTube API все ще видавав кількість відміток «Не подобається», а також відмітки «Подобається»/«Не подобається» користувачів розширення та екстраполяцію. В найближчому майбутньому ми дозволимо творцям контенту легко та безпечно надсилати свої відмітки «Не подобається», а також ми додамо архівні дані ArchiveTeam (4,56 мільярди відео) до нашої поточної бази даних. Ви можете переглянути відео на цю тему.",
|
||||
bullet7: "Чому лічильник відміток «Не подобається» пише 'DISLIKES DISABLED'?",
|
||||
bullet7:
|
||||
"Чому лічильник відміток «Не подобається» пише 'DISLIKES DISABLED'?",
|
||||
bullet7text:
|
||||
"Іноді на нещодавно завантаженому відео може з'являтися повідомлення 'DISLIKES DISABLED', навіть попри те, що автор не вимикав відмітки «Не подобається». Це пов’язано з тим, як ми визначаємо, чи вимкнені оцінки «Не подобається». Це повідомлення має зникнути через кілька годин або після отримання відмітки «Подобається»/«Не подобається» і оновлення сторінки (сподіваюся).",
|
||||
},
|
||||
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
// { name: "Deutsch", locale: "de" },
|
||||
{ name: "Українська", locale: "uk" },
|
||||
{ name: "한국어", locale: "ko" },
|
||||
{ name: "Polski", locale: "pl"},
|
||||
{ name: "Polski", locale: "pl" },
|
||||
],
|
||||
alert: {
|
||||
show: false,
|
||||
|
||||
@@ -177,7 +177,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
this.$axios
|
||||
.$get(
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json"
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json",
|
||||
)
|
||||
.then((res) => {
|
||||
this.userInformation.extension.latestExtensionVersion = res.version;
|
||||
|
||||
@@ -133,7 +133,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
fetch(
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json"
|
||||
"https://raw.githubusercontent.com/Anarios/return-youtube-dislike/main/Extensions/combined/manifest-chrome.json",
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((json) => {
|
||||
|
||||
@@ -125,13 +125,13 @@ export default {
|
||||
if (videoId !== lastVideoId && videoId.length === 11) {
|
||||
fetch(
|
||||
"https://returnyoutubedislikeapi.com/votes?videoId=" +
|
||||
(lastVideoId = videoId)
|
||||
(lastVideoId = videoId),
|
||||
)
|
||||
.then((resp) => resp.json())
|
||||
.then(
|
||||
(data) =>
|
||||
(document.getElementById("output").innerText =
|
||||
"Likes=" + data.likes + " Dislikes=" + data.dislikes)
|
||||
"Likes=" + data.likes + " Dislikes=" + data.dislikes),
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -162,7 +162,8 @@ input {
|
||||
stroke: #f44;
|
||||
transition-property: opacity, transform;
|
||||
transform: scale(0) rotate(180deg);
|
||||
animation: popin 1s 0.3s ease-in-out 1 forwards,
|
||||
animation:
|
||||
popin 1s 0.3s ease-in-out 1 forwards,
|
||||
tap 0.3s 1.7s ease-in-out 1 forwards;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
{
|
||||
tag: "itsbudyn#6502",
|
||||
lang: "Polski",
|
||||
}
|
||||
},
|
||||
],
|
||||
coolProjects: [
|
||||
{
|
||||
|
||||
+8
-1
@@ -8,7 +8,11 @@
|
||||
"dev": "webpack --mode=production --watch",
|
||||
"build": "webpack --mode=production",
|
||||
"build:safari": "webpack --mode=production && xcrun safari-web-extension-converter Extensions/combined/dist/safari --project-location Extensions/combined/dist --bundle-identifier com.returnyoutubedislike.safari-ext --force",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "prettier --write --ignore-unknown"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -32,6 +36,9 @@
|
||||
"babel-loader": "^9.1.3",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"filemanager-webpack-plugin": "^8.0.0",
|
||||
"husky": "^8.0.0",
|
||||
"lint-staged": "^15.2.0",
|
||||
"prettier": "^3.2.2",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-cli": "^5.1.4"
|
||||
}
|
||||
|
||||
+1
-2
@@ -17,7 +17,7 @@ module.exports = {
|
||||
entries.map((entry) => [
|
||||
entry,
|
||||
path.join(__dirname, "./Extensions/combined/", `${entry}.js`),
|
||||
])
|
||||
]),
|
||||
),
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
@@ -89,7 +89,6 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
],
|
||||
experiments: {
|
||||
topLevelAwait: true,
|
||||
|
||||
Reference in new issue
Block a user