CHUNITHM get JSON file

Get JSON file that can be used in https://reiwa.f5.si

Version vom 21.10.2024. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         CHUNITHM get JSON file
// @version      1.0
// @description  Get JSON file that can be used in https://reiwa.f5.si
// @author       Alanimdeo
// @match        https://chunithm-net-eng.com/*
// @grant        none
// @license      MIT
// @namespace https://greasyfork.org/users/1384234
// ==/UserScript==

const css = `.jsonButton {
  background-color: #17a2b8;
  border-radius: 5px;
  border: 1px solid #17a2b8;
  display: block;
  width: fit-content;
  cursor: pointer;
  color: #ffffff;
  font-size: 1.5rem;
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  margin: 1rem auto;
}
.green {
  background-color: #28a745;
  border: 1px solid #28a745;
}
.green:hover {
  background-color: #218838;
}
.green:active {
  background-color: #117828;
}`;

const d = document;

(function () {
  "use strict";
  const downloadJsonBtn = d.createElement("button");
  downloadJsonBtn.className = "jsonButton green";
  downloadJsonBtn.innerText = "Download JSON";
  downloadJsonBtn.addEventListener("click", () => {
    var e = d.createElement("script");
    e.src =
      "https://reiwa.f5.si/chuni_scoredata/main.js?" +
      String(Math.floor(new Date().getTime() / 1e3));
    d.body.appendChild(e);
  });
  const style = d.createElement("style");
  if (style.styleSheet) {
    style.styleSheet.cssText = css;
  } else {
    style.appendChild(d.createTextNode(css));
  }
  d.getElementsByTagName("head")[0].appendChild(style);
  const cf = d.querySelector(".clearfix");
  cf?.insertAdjacentElement("afterend", downloadJsonBtn);
})();