How to track on YouTube via js did people like, dislike, or anything else?

What is the question ?
I have an extension that I want using javascript to keep track of did people like dislike or nothing at all on the roller, generally once you track appreciated if he video.

I then last question suggested that it is possible so.
if(document.querySelector('.ytd-subscribe-button-renderer').textContent === 'You are subscribed'){
console.log('Signed');
}


But the problem is that this will work if the YouTube interface will be in Russian.
That is, it will be necessary to take the textContent and drive through the cycles at different language the word subscribe or unsubscribe and then already to do conclusions.
Maybe there's some other way ?

Of course I tried yesterday to do something but trying to make it not to no avail.

document.querySelector('.y-toggle-button-renderer').textContent;


The problem is that these buttons a lot with the class .y-toggle-button-renderer and there is no such simplicity as with button subscription.

Another point concerned the tags at Google in the house ?


They wrote a bunch of their tags ?

How do you learn to work with them in terms of what I needed.
To understand whether there is subscription or no subscription, the assessment of the roller, roller track that is currently playing and when he is on pause.
April 3rd 20 at 18:49
2 answers
April 3rd 20 at 18:51
The buttons with like / dislike by clicking on them changes class. If you are not pressed, then by default they have registered the class "style-text". If you like put in / dislik - that is, click on the buttons class have changed from "style-text" to "style-default-active". Can track it.

... and there is no such prostate as with button subscription.

And where does the prostate???
@Marquise.Hamill, okay, I understand I can do
document.querySelector('.y-toggle-button-renderer.style-default-active')


But what does it mean ? I only understand what some of the buttons are active, but how to distinguish what is what like responsible for dislike I do not understand.

About prostate is a mistake)))) - asha45 commented on April 3rd 20 at 18:54
April 3rd 20 at 18:53
https://developers.google.com/youtube/v3/docs/subs...
https://developers.google.com/youtube/v3/docs/vide...
{
 "kind": "youtube#videoGetRatingResponse",
 "items": [
{
 "videoId": "QnOyWe2EnDw",
 "rating": "like"
}
]
}
I don't need via the api and in js handles check. - asha45 commented on April 3rd 20 at 18:56
@Santos_Rober, And the next time you redesign to rewrite everything? And even more interesting will be when they next AB testing will begin and half of the users will be old and half new.
The color of the icon depends on this class
y-toggle-button-renderer.style-default-active[is-icon-button]
y-toggle-button-renderer.style-text[is-icon-button]

the first y-toggle-button-renderer is like, the second y-toggle-button-renderer dislike - orpha.Douglas commented on April 3rd 20 at 18:59
@dayana.Wilkinson, to access the api project which the wrap will be difficult. - asha45 commented on April 3rd 20 at 19:02

Find more questions by tags JavaScriptExtensions for browsers