Greasy Fork is available in English.

Youtube exact upload

Adds exact upload time to youtube videos

< Обсуждения Youtube exact upload

Отзыв: Хороший — скрипт работает как нужно

Hello,

Sorry for the inconvenience, but could I have the explanations to make your script work please ?
I have already installed it.

Thank you for your answer.

Google Chrome Browser with Tampermonkey

You need to adjust the variables in the beginning of the script, most importantly YT_API_KEY. ccrowles once posted an article about how to get one here. If you have an Discord Account I could try to help your further there: https://discord.gg/HgJQNJ8C7A

It's really nice to you, but I don't have a Discord account or a social network. Just an email.
Thank you for the article.

Ok, tell me if you need my email or have any other questions and I'll try to answer them

I would like to add these 2 models, but I don't know how I have to modify the script to avoid errors...
If the explanations must be done by email, then I want please.

TIME_PATTERN: "HH:mm:ss" Example: 22:00:00
TODAY_AT: "Today at "

I just wanted to make sure I see responses faster. We don't have to do it by email.
The TIME_PATTERN and TODAY_AT and all other variables should work out of the box, you just have to change them if you want to change the format that is shown.
The script checks for the language and uses either german or english according to the language of the youtube page.
Do you need help setting up the API-Key or do you want to change the format of the datetime? The datetime is shown above the Video Player.

Okay,
My language is French.

If possible, I would like as format :
DATE_PATTERN: "DD.MM.YYYY" Example: 27 march 2021
TIME_PATTERN: "HH:mm:ss" Example: 22:00:00

About the API-Key, yes please beacause I have never done it and I don't know how to do it...

Very sorry for the inconvenience and thank you in advance.

DATE_PATTERN -> DD.MMMM.YYYY
TIME_PATTERN is already correct in that case

For the API-Key:
1. Go to https://console.cloud.google.com/cloud-resource-manager
2. Click "Create project" or something like that on top below the blue bar (idk how Google called that in english because mine is German, so the string might differ a little)
3. Give it a name
4. Click "Create"
5. Wait for it and then select the project in the notification view that should be opened
6. Click "APIs and Services" in the menu on the left
7. Click "Activate APIs and Services" on top of the page
8. Search for "YouTube Data API v3" and click the right result
9. Click "Activate"
10. Click "Login credentials" or smth like that on the left (3rd entry from top)
11. Click "Create Credentials" at top and than API-Key
12. Copy the API-Key. It should look like "AIzaSyCSV_lngWArgHyqeXtDqYsbEoGSuKZrYJU" (I deleted it, so it won't work anymore)

Correction: DATE_PATTERN would be "DD MMMM YYYY" because you wanted to split by spaces instead of dots

Hello,

I followed your instructions and I got an API-Key for YouTube Data API v3.

1) At present, how I should correctly modify the script please ?

2) It's possible to add the name of the day : Monday, Tuesday... or it's impossible ?

Thank you again in advance for your answer.

1) You need to adjust the line var YT_API_KEY = "YouTube API-Key"; like so var YT_API_KEY = "AIzaSyCSV_lngWArgHyqeXtDqYsbEoGSuKZrYJU"; (But you have to use your own API-Key) 2) dddd, DD MMMM YYYY (if you want to prepend it separated by ", ") - I haven't implemented momentjs's multi language support, so that weekday will probably stay english even if your browser speaks french - If you want to you can check https://momentjs.com/docs/#/parsing/string-format/ for the different possibilities

§
Создано: 06.08.2022
Отредактировано: 06.08.2022

Very good, it works very well.

Thank you also for the article of momentjs.com. It's really instructive...

Can we increase the font size and if yes how please ?

Yes, that is possible I think but that is a code adjustment, so no simple change in the variables at top and I first have to look into it

Okay, I understand.
Otherwise, thanks a lot for your help, your time and your amazing script.
It's really nice to you :-)

Do you think that one day your script will be multi languages ?

For the strings it already is german and english depending on the lang-attribute of youtubes html code.
For the multilanguage support in weekdaynames and monthnames etc. I need to change the momentjs dependency and logic a bit.
If it is me I could include other languages outside of weekdaynames and monthnames pretty easily if I knew the words/sentences and the 2-char-language-code (I don't want to use GTranslate for that)

Okay, I understand.

What words/sentences would you like to have in French ?

Simply those variables (DATE_PATTERN and TIME_PATTERN I'd just like to know the default format in france). You'd just have to translate everything between the double quotes if you want to:
var DATE_PATTERN = "DD.MM.YYYY";
var TIME_PATTERN = "HH:mm:ss";
var DATETIME_COMBINE_PATTERN = " [at] "; // <- That's simply the text between date and time. Those `[` and `]` are just there to tell momentjs to not try to format them.
var SCHEDULED_LIVESTREAM_START = "Livestream scheduled for: ";
var SCHEDULED_PREMIERE_START = "Premiere scheduled for: ";
var ONGOING_LIVESTREAM_START = "Active Livestream since ";
var ONGOING_PREMIERE_START = "Active Premiere since ";
var ENDED_LIVESTREAM_START = "Livestream from ";
var ENDED_PREMIERE_START = "Premiere from ";
var DATETIME_UNTIL_PATTERN = " until "; // between two datetimes when the video is either a premiere or a livestream that already ended
var SINCE = "Since"; // When a livestream didn't start today, it can start with Since and therefore there is that variable
var TODAY_AT = "Today at ";

Btw. make sure you save your API-Key somewhere because every change you made to the script will be reset whenever the script updates because I haven't implemented settings for the script. That's also the reason you had to adjust the script.

§
Создано: 07.08.2022
Отредактировано: 07.08.2022

var DATE_PATTERN = "DD MM. YYYY"; -> 24 juil. 2022
var TIME_PATTERN = "HH:mm:ss"; -> 14:28:00
var DATETIME_COMBINE_PATTERN = " [at] "; // <- That's simply the text between date and time. Those `[` and `]` are just there to tell momentjs to not try to format them. -> [à]
var SCHEDULED_LIVESTREAM_START = "Livestream scheduled for: "; -> Planifié pour le
var SCHEDULED_PREMIERE_START = "Premiere scheduled for: ";
var ONGOING_LIVESTREAM_START = "Active Livestream since "; for a "Active Livestream since" that started in 2019, 6 months, 2 weeks (often webcams) -> Diffusion lancée le 18 déc. 2019
var ONGOING_LIVESTREAM_START = "Active Livestream since "; for a "Active Livestream since" that started now -> Diffusion lancée il y a 2 minutes
var ONGOING_PREMIERE_START = "Active Premiere since ";
var ENDED_LIVESTREAM_START = "Livestream from "; for a "Livestream from " since one day or more -> Diffusée en direct le 3 août 2022
var ENDED_LIVESTREAM_START = "Livestream from "; for a "Livestream from " since less than one day -> Diffusé en direct il y a 76 minutes and Diffusé en direct il y a 14 heures
var ENDED_PREMIERE_START = "Premiere from "; -> Sortie le 12 sept. 2022
var DATETIME_UNTIL_PATTERN = " until "; // between two datetimes when the video is either a premiere or a livestream that already ended -> jusqu'à
var SINCE = "Since"; // When a livestream didn't start today, it can start with Since and therefore there is that variable -> This corresponds to the 6th line ?
var TODAY_AT = "Today at "; -> Aujourd'hui à


Weekdays in French :
Monday -> Lundi
Tuesday -> Mardi
Wednesday -> Mercredi
Thursday -> Jeudi
Friday -> Vendredi
Saturday -> Samedi
Sunday -> Dimanche


Months in French :
January -> Janvier
February -> Février
March -> Mars
April -> Avril
May -> Mai
June -> Juin
July -> Juillet
August -> Août
September -> Septembre
October -> Octobre
November -> Novembre
December -> Décembre


Sorry, because after spending a few hours on YouTube to have the real words in French of YouTube, those are missing for the Premieres, because I subscribe to channels that make very few Premieres...
YouTube doesn't suggest me any too :-(

Hello,

Do you think that your script can also be translated into French please ?
Or it's too much work...

Tbh. I haven't really looked into it yet. I think it will be possible, but since it is just a side project I don't even know when I find time and motivation to work on this script. For the weekday names and month names I have to check if I can simply change the locale or the strings of momentjs or to maybe just replace the english names with their french equivalent when formatting the date and time.

Okay, I understand and thank you for your answer.

§
Создано: 22.09.2022
Отредактировано: 22.09.2022

Hello,

Sorry because I didn't know that you updated your script in French also.

After carefully looking at the English, German and Italian translations, I updated the French translation simpler and clearer that I give you below :

  1. } else if (lang.startsWith("fr")) {
  2. var DATE_PATTERN = "DD MMMM YYYY"; // https://momentjs.com/docs/#/parsing/string-format/
  3. var TIME_PATTERN = "HH:mm:ss"; // https://momentjs.com/docs/#/parsing/string-format/
  4. var DATETIMECOMBINEPATTERN = " [de] "; // https://momentjs.com/docs/#/parsing/string-format/
  5. var SCHEDULEDLIVESTREAMSTART = "Direct planifié pour le ";
  6. var SCHEDULEDPREMIERESTART = "Première planifiée pour le ";
  7. var ONGOINGLIVESTREAMSTART = "Direct en cours depuis ";
  8. var ONGOINGPREMIERESTART = "Première en cours depuis ";
  9. var ENDEDLIVESTREAMSTART = "Direct diffusé le ";
  10. var ENDEDPREMIERESTART = "Première diffusée le ";
  11. var DATETIMEUNTILPATTERN = " à ";
  12. var SINCE = "Depuis";
  13. var TODAY_AT = "Aujourd'hui à ";

Lines 42 to 54

Of course, that's if it's possible for you and thank you in advance :-)

Hello,

Sorry for the inconvenience, but I gave you a translation for the French language above.
Do you think that you will have the opportunity to implement it in your script please ?

Thank you for your answer.

Thank you! Tbh I forgot about it because of other TODOs. On that occasion I also moved declaration of vars outside of the if to prevent multiple warnings in almost every if body.

Thank you very much, it's really nice to you :-)

Ответить

Войдите, чтобы ответить.