Hidden Gikos

This script makes all the hidden gikopoi characters visible in the selection screen and removes the message indicating that they are secret. このスクリプトは、隠されていたgikopoiのキャラクターをすべて選択画面で見えるようにし、秘密であることを示すメッセージを削除します。

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Hidden Gikos
// @namespace    http://tampermonkey.net/
// @version      0.2.5
// @description  This script makes all the hidden gikopoi characters visible in the selection screen and removes the message indicating that they are secret. このスクリプトは、隠されていたgikopoiのキャラクターをすべて選択画面で見えるようにし、秘密であることを示すメッセージを削除します。
// @author       dinghy
// @author       roris
// @author       feor
// @match        *://gikopoipoi.net/*
// @grant        none
// ==/UserScript==

(async function () {
  'use strict';
  console.log("Hidden Gikos Enabled");

  function waitFor(getValue, timeout) {
    return new Promise((resolve, reject) => {
      const end = Date.now() + (timeout || 5000);

      (function check() {
        const value = getValue();
        if (value) return resolve(value);
        if (Date.now() > end) return reject(new Error('Timed out'));
        setTimeout(check, 50);
      })();
    });
  }

  await waitFor(() =>
    document.getElementsByTagName('label').length &&
    document.getElementById('login-button')
  );

  var elems = document.getElementsByTagName('label');
  for (var i = 0; i < elems.length; i++) {
    if (elems[i].style.display == 'none') {
      elems[i].style.display = 'block';
      elems[i].style.fontSize = 0;
    }
  }

  const loginButton = document.getElementById('login-button');
  loginButton.addEventListener('click', async () => {
    const siteArea = await waitFor(() => window.vueApp?._container?._vnode?.component?.proxy?.getSiteArea?.());
    const sendButton = await waitFor(() => document.getElementById('send-button'));
    const settingsButton = await waitFor(() => {
      const buttons = document.getElementsByClassName('fa-cogs');
      return buttons.length ? buttons[0] : null;
    });

    const henshinButton = document.createElement('button');
    if (siteArea.id == 'gen') {
      console.log("Server: " + siteArea.id);
      henshinButton.textContent = '#変身';
    } else {
      henshinButton.textContent = '#henshin';
    }
    henshinButton.setAttribute('type', 'button');

    henshinButton.addEventListener('click', () => {
      const input = document.getElementById('input-textbox');
      input.value = '#henshin';
      sendButton.click();
    });

    settingsButton.parentElement.appendChild(henshinButton);
  });
})();