Traffic1s.com skipper

time is golden, not for ya

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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