hinatazaka46-process

Perform base processing

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greasyfork.org/scripts/532854/1646326/hinatazaka46-process.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name            hinatazaka46-process
// @namespace       https://greasyfork.org/ja/users/1328592-naoqv
// @description	    Perform base processing
// @description:ja  基底処理を実行
// @version         0.15
// @icon            https://cdn.hinatazaka46.com/files/14/hinata/img/favicons/favicon-32x32.png
// @grant           none
// @license         MIT
// ==/UserScript==

let id;
let count = 0;

const replaceLang = () => {

  const langSelect = document.getElementById('wovn-translate-widget');
  
  if (count >= 10) {
    clearInterval(id);
  }
  if (langSelect) {
    langSelect.style.top = "5px";
    document.querySelector('.wovn-lang-selector').style.height = "25px";
    document.querySelector('.wovn-lang-selector-links').style.paddingTop = "5px";
    clearInterval(id);
  }
  count++;
};


const doProcess = (proc, scriptName) => {
  
  handleException(proc, scriptName);

  handleException(() => {
    const colorMode = getColorMode();

    initializeColorToggle(colorMode);

    analyzeDefaultColor();
    setColor(getPageType(), colorMode);

  }, "HinatazakaBaseProcessor");
    
  id = setInterval(replaceLang, 200);
};