Greasy Fork镜像 is available in English.

openload

Remove anti-adblock, ads, popups and timer waits, and show direct download link

< Σχολιασμός για τον κώδικα openload

Αναφορά: Καλός - ο κώδικας λειτουργεί

§
Δημοσιεύτηκε: 18/04/2018
Επεξεργάστηκε: 18/04/2018

<3 <3 <3 Improvement proposal with automatic translation o:)

I propose translating your script with something like that:

const AcceptLngs = [ 'de', 'en', 'es', 'fr', 'it', 'pt', 'pt-BR', 'ru' ];

//[ °°° SECTION LANGUAGES MAP °°° ]         If you add new languages in the `LANGUAGES MAP`, add them in the var `AcceptLngs` too (see above). Keep the schema, !important for the future
                                      //  new line with `\n` and escaping special charactere with `\` (except for downloaderHotkey and fixmeGM).
  const _getI18nMap = {  // Default lng is 'en' if no supported in AcceptLngs
      en: {
          downloading: 'Downloading', hereIsTheLink: 'Here is the link' },
      de: {
          downloading: 'Herunterladen', hereIsTheLink: 'Hier ist der Link' },
      es: {
          downloading: 'Descargan', hereIsTheLink: 'Aqui esta el link' },
      fr: {
          downloading: 'Téléchargement', hereIsTheLink: 'Voici le lien' },
      it: {
          downloading: 'Scaricamento', hereIsTheLink: 'Ecco il link' },
      pt: {
          downloading: 'Baixar', hereIsTheLink: 'Aqui está o link' },
 'pt-BR': {
          downloading: 'Baixar', hereIsTheLink: 'Aqui está o link' },
      ru: {
          downloading: 'Загрузка', hereIsTheLink: 'Ссылка здесь' }
  };

//[ °°° SECTION BROWSER °°° ]

const nav = window.navigator, navLng = nav.language||nav.browserLanguage||nav.userLanguage;
var L10n = navLng;  // Keep `var` !important

!function setLng() {
    (function isLngDispo() {
        if (function checkLng() {
            AcceptLngs.indexOf(L10n) < -1 && (L10n = L10n);
        }(), -1 === AcceptLngs.indexOf(L10n)) L10n = L10n.substring(0, 2);
    })(), -1 === AcceptLngs.indexOf(L10n) && (L10n = 'en');                    // If L10n not supported, default 'en';
}();

const translate = _getI18nMap[L10n];          // Now, use translate.whatYouWant ( better than translate[whatYouWant] ).

This come from my contribution for Deezer:D➲wnloader [Revived]

and then, use (A solution by @AHOHNMYC ) :

.text(translate.downloading.toUpperCase())

$(streamurl).text() != translate.hereIsTheLink.toUpperCase() &&
leoncastroΔημιουργός
§
Δημοσιεύτηκε: 21/04/2018

Hello @K-mik@Z, first of all thank you for your proposal. Currently the Openload's interface is only available in English, so it seems unnecessary and even rare to translate this script. Note also that it is a lot of code for a single-phrase translation, as there is only one sentence to translate, and this is added only in the embedded player: "FREE DOWNLOAD". In the future, if the Openload's interface is translated, I will adjust the script with your proposal. Best regards.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.

长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元