This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.

182 lines
6.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" name="viewport">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Discord">
<meta property="og:title" content="Discord - A New Way to Chat with Friends & Communities">
<meta property="og:description" content="Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.">
<meta property="og:image" content="https://discord.com/assets/ee7c382d9257652a88c8f7b7f22a994d.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@discord">
<meta name="twitter:creator" content="@discord">
<link rel="stylesheet" href="/assets/0.2b34836c33685cfed2cb.css">
<link rel="icon" href="/assets/07dca80a102d4149e9736d4b162cff6f.ico">
<link rel="manifest" href="/assets/manifest.json">
<title>Discord</title>
<script>
(function() {
window.GLOBAL_ENV = {};
window.__OVERLAY__ = /overlay/.test(location.pathname)
window.__BILLING_STANDALONE__ = /^\/billing/.test(location.pathname)
function protocolRelative(url) {
if (!url) return '';
return '//' + url.replace(/^https?:\/\//, '').replace(/\/$/, '');
}
async function loadGlobalEnv() {
try {
const res = await fetch("/.well-known/spacebar/client");
const data = await res.json();
window.GLOBAL_ENV = {
API_ENDPOINT: protocolRelative(data.api.baseUrl) + "/api",
API_VERSION: 9,
WEBAPP_ENDPOINT: protocolRelative(data.api.baseUrl),
CDN_HOST: protocolRelative(data.cdn.baseUrl),
ASSET_ENDPOINT: protocolRelative(data.cdn.baseUrl),
MEDIA_PROXY_ENDPOINT: protocolRelative(data.cdn.baseUrl),
WIDGET_ENDPOINT: '//discord.com/widget',
INVITE_HOST: 'discord.gg',
GUILD_TEMPLATE_HOST: 'discord.new',
GIFT_CODE_HOST: 'discord.gift',
RELEASE_CHANNEL: 'stable',
MARKETING_ENDPOINT: protocolRelative(data.api.baseUrl),
BRAINTREE_KEY: 'production_5st77rrc_49pp2rp4phym7387',
STRIPE_KEY: 'pk_live_CUQtlpQUF0vufWpnpUmQvcdi',
NETWORKING_ENDPOINT: protocolRelative(data.api.baseUrl),
RTC_LATENCY_ENDPOINT: protocolRelative(data.api.baseUrl),
ACTIVITY_APPLICATION_HOST: protocolRelative(data.api.baseUrl),
PROJECT_ENV: 'production',
REMOTE_AUTH_ENDPOINT: '//remote-auth-gateway.discord.gg',
SENTRY_TAGS: { buildId: '9af39da', buildType: 'normal' },
MIGRATION_SOURCE_ORIGIN: protocolRelative(data.api.baseUrl),
MIGRATION_DESTINATION_ORIGIN: protocolRelative(data.api.baseUrl),
HTML_TIMESTAMP: Date.now(),
ALGOLIA_KEY: 'aca0d7082e4e63af5ba5917d5e96bed0',
GATEWAY_URL: data.gateway.baseUrl
};
const scripts = [
'/assets/053574d0f6edc579c71e.js',
'/assets/771dcd97bfd5f9b77ef6.js',
'/assets/0ffb9e3c90aa88720fc7.js',
'/assets/cbc98c97c3635bf34da3.js'
];
scripts.forEach(src => {
const s = document.createElement('script');
s.src = src;
s.defer = true;
document.body.appendChild(s);
});
} catch (e) {
console.error('Failed to load GLOBAL_ENV', e);
}
}
loadGlobalEnv();
})();
</script>
<script>
(function() {
let lastCredentials = null;
const OriginalRTC = window.RTCPeerConnection;
window.RTCPeerConnection = function(...args) {
const pc = new OriginalRTC(...args);
const originalCreateOffer = pc.createOffer.bind(pc);
pc.createOffer = async function(options) {
const offer = await originalCreateOffer(options);
if (offer.sdp) {
const lines = offer.sdp.split('\n');
for (const line of lines) {
if (line.includes('a=fingerprint')) {
const fp = line.split('a=fingerprint:')[1]?.trim();
if (fp) {
lastCredentials = lastCredentials || {};
lastCredentials.fingerprint = fp;
}
}
}
}
return offer;
};
return pc;
};
Object.setPrototypeOf(window.RTCPeerConnection, OriginalRTC);
Object.setPrototypeOf(window.RTCPeerConnection.prototype, OriginalRTC.prototype);
const OriginalSend = WebSocket.prototype.send;
WebSocket.prototype.send = function(data) {
try {
let parsed = JSON.parse(data);
if (parsed.d && typeof parsed.d === 'object') {
for (const [key, value] of Object.entries(parsed.d)) {
if (typeof value === 'string' && (value.includes('a=extmap') || value.includes('a=ice-') || value.includes('a=rtpmap'))) {
if (!value.includes('a=fingerprint')) {
parsed.d[key] = addFingerprintToSdp(value);
}
}
}
return OriginalSend.call(this, JSON.stringify(parsed));
}
} catch (e) {}
return OriginalSend.call(this, data);
};
function addFingerprintToSdp(sdp) {
const fingerprint = lastCredentials?.fingerprint;
if (!fingerprint) return sdp;
const lines = sdp.split('\n');
const result = [];
let added = false;
for (const line of lines) {
result.push(line);
if (!added && line.includes('a=ice-pwd:')) {
result.push(`a=fingerprint:${fingerprint}`);
added = true;
}
}
return result.join('\n');
}
})();
</script>
</head>
<body>
<div id="app-mount"></div>
<style>
[class^="qrCodeOverlay"] {
all: unset;
background-image: url("/assets/pilkerton.png");
background-size: 180px 185px;
width: 100%;
height: 100%;
}
[class*="qrCode-"][class*="spinner-"] { display: none; }
button[aria-label="Send a gift"], a[href="/store"] { display: none; }
.platform-win .notice-3bPHh- { display: none; }
div[aria-controls="Discord Nitro-tab"],
div[aria-controls="Nitro Server Boost-tab"],
div[aria-controls="Library Inventory-tab"],
div[aria-controls="Billing-tab"] { display: none; }
</style>
</body>
</html>