Traffic1s.com skipper

time is golden, not for ya

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           Traffic1s.com skipper
// @name:vi        Chống rút gọn Traffic1s.com
// @namespace      SignedBy.hUwUtao
// @license        MIT
// @version        0.1
// @description    time is golden, not for ya
// @description:vi Không cần tìm code trên google
// @author         hUwUtao
// @match          https://traffic1s.com/*
// ==/UserScript==
document.getElementsByName("code").length != 0 && //
  (!new URLSearchParams(window.location.search).get("code") || //
    document.querySelector(".alert.alert-danger") != null) && //
  ((host) =>
    fetch("https://traffic1s.com/get-code?hostname=" + host)
      .then((response) => response.json())
      .then(
        (response) =>
          (window.location.href = (function (c) {
            const u = new URL(window.location.href);
            u.searchParams.set("code", c);
            return u.toString();
          })(response.html))
      ))(prompt("Type in the hostname of requested page: ex google.com"));