y5545dvu.js
| 1.0 kB | torrent | get
.
(async function iife() {

let webpackRequire = webpackChunkdiscord_app.push([[Symbol()],{},(r) => r]);

// cleanup the chunk we added
webpackChunkdiscord_app.pop();

let modules = webpackRequire.m;
let cache = webpackRequire.c;

function findByCode(src) {
  for (const [id, mod] of Object.entries(modules)) {
    if (mod.toString().includes(src)) {
      return cache[id].exports;
    }
  }
}

function findObjectFromKey(exports, key) {
  if (!exports) return;
  for (const exportKey in exports) {
    const obj = exports[exportKey];
    if (obj && obj[key]) return obj;
  }
}

const api = findObjectFromKey(
  findByCode('.set("X-Audit-Log-Reason",'),
  "patch",
);

const request = await api.post({
  url: "/age-verification/verify",
  body: { method: 3 },
});

const verificationUrl = request.body.verification_webview_url;
console.log("Verification URL: " + verificationUrl);
window.location.href = `https://age-verifier.kibty.town/webview?url=${encodeURIComponent(verificationUrl)}`;
})();