mirror of
https://github.com/xyzeva/k-id-age-verifier.git
synced 2026-06-11 08:57:55 +02:00
meta: disable script frontend for now
Removed outdated Discord verification script and updated messaging.
This commit is contained in:
+1
-127
@@ -17,133 +17,7 @@
|
||||
<a class="underline" href="https://amplitudes.me/" target="_blank">amplitudes</a> (for previous work)
|
||||
</p>
|
||||
|
||||
<h2 class="mt-8 text-2xl font-bold">how to verify on discord</h2>
|
||||
<p class="mt-4 text-left">
|
||||
it <span class="font-bold">doesn't matter</span> if you are in the UK or similar region that
|
||||
currently has access to this, this will verify your account for the future global rollout in
|
||||
march aswell as current. to use, simply paste this script into your discord console by going to
|
||||
<a
|
||||
class="font-bold underline"
|
||||
href="https://discord.com/app"
|
||||
target="_blank"
|
||||
rel="noreferer noopener">discord.com/app</a
|
||||
>, pressing <span class="font-bold">F12</span>, going to <span class="font-bold">Console</span>
|
||||
and copying and pasting and hitting enter on the following script and solving the captcha that pops
|
||||
up
|
||||
<span class="text-white/70">(typing "allow pasting" before if necessary)</span>:
|
||||
</p>
|
||||
<pre class="my-4 bg-white/10 p-5 text-wrap">
|
||||
// add a chunk to extract webpack's moduleCache
|
||||
let webpackRequire = webpackChunkdiscord_app.push([[Symbol()],{},(r) => r]);
|
||||
// cleanup the chunk we added
|
||||
webpackChunkdiscord_app.pop();
|
||||
|
||||
let modules = webpackRequire.m;
|
||||
let cache = webpackRequire.c;
|
||||
|
||||
// https://github.com/moonlight-mod/moonlight/blob/main/packages/core-extensions/src/spacepack/webpackModules/spacepack.ts
|
||||
// helper to find a webpack module via code snippet
|
||||
function findByCode(src) {
|
||||
for (const [id, mod] of Object.entries(modules)) {
|
||||
if (mod.toString().includes(src)) {
|
||||
return cache[id].exports;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// helper to find an object by its key
|
||||
function findObjectFromKey(exports, key) {
|
||||
if (!exports) return;
|
||||
for (const exportKey in exports) {
|
||||
const obj = exports[exportKey];
|
||||
if (obj && obj[key]) return obj;
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/moonlight-mod/moonlight/blob/main/packages/mappings/src/mappings/discord/utils/HTTPUtils.ts
|
||||
// find the discord api client
|
||||
const api = findObjectFromKey(
|
||||
findByCode('.set("X-Audit-Log-Reason",'),
|
||||
"patch",
|
||||
);
|
||||
|
||||
// send a api request to discord /age-verification/verify and then redirect the page to our website
|
||||
const request = await api.post({
|
||||
url: "/age-verification/verify",
|
||||
body: { method: 3 },
|
||||
});
|
||||
const verificationUrl = request.body.verification_webview_url;
|
||||
window.location.href = `https://age-verifier.kibty.town/webview?url=${encodeURIComponent(verificationUrl)}`;</pre>
|
||||
<p class="text-center text-white/50">
|
||||
(feel free to read the code, we made it readable and we have nothing to hide)
|
||||
</p>
|
||||
<p class="mt-4 text-left">
|
||||
it should navigate to a link <span class="text-white/70"
|
||||
>(or give you a link to navigate to)</span
|
||||
>, from there, you can just wait until the page says success
|
||||
</p>
|
||||
<p class="mt-2 text-left">congrats! your discord account is now age verified.</p>
|
||||
|
||||
<h2 class="mt-4 text-2xl font-bold">
|
||||
how to verify on other platforms (twitch, kick, snapchat, ...others)
|
||||
</h2>
|
||||
<p>
|
||||
navigate to the age verification page and choose selfie, from there, get the url of the qr code
|
||||
and put it in this input box, and press verify
|
||||
</p>
|
||||
|
||||
<div class="mt-4 flex gap-4">
|
||||
<input
|
||||
class="w-full border-2 border-white/50 p-2"
|
||||
bind:value={qrCodeUrl}
|
||||
placeholder="https://..."
|
||||
/>
|
||||
<button
|
||||
class="w-24 border-2 border-white/50 p-2 hover:cursor-pointer"
|
||||
onclick={(e) => {
|
||||
e.preventDefault();
|
||||
qrCodeError = null;
|
||||
qrCodeSuccess = false;
|
||||
|
||||
if (!qrCodeUrl) {
|
||||
qrCodeError = "you didn't enter a qr code url";
|
||||
return;
|
||||
}
|
||||
|
||||
fetch('/api/verify', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
type: 'qr_link',
|
||||
identifier: qrCodeUrl
|
||||
})
|
||||
})
|
||||
.then(async (r) => {
|
||||
if (!r.ok) {
|
||||
qrCodeError = await r.text().catch(() => 'unexpected error');
|
||||
return;
|
||||
}
|
||||
|
||||
qrCodeSuccess = true;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('error sending verify request', e);
|
||||
qrCodeError = 'unexpected error, please check your browser console.';
|
||||
});
|
||||
}}>verify</button
|
||||
>
|
||||
</div>
|
||||
{#if qrCodeSuccess}
|
||||
<p class="mt-4 text-green-500">
|
||||
your account has successfully been verified. go back to the site tab to continue
|
||||
</p>
|
||||
{:else if qrCodeError}
|
||||
<p class="mt-4 text-red-500">
|
||||
{qrCodeError}
|
||||
</p>
|
||||
{/if}
|
||||
<p class="mt-8 text-red-500">this script doesn't work anymore and has been temporarily disabled while we're looking into a fix.</p>
|
||||
|
||||
<h2 class="mt-8 text-2xl font-bold">how does this work</h2>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user