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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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