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のキャラクターをすべて選択画面で見えるようにし、秘密であることを示すメッセージを削除します。

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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);
  });
})();