Tutorial video: 2.5-minute narrated walkthrough on /guides/how-the-draft-works (Watch how it works) + 'Watch the 2-minute walkthrough' link in the home hero; server sends .mp4/.webm with byte ranges (sendMedia); chatbot fact; fx.css?v=4 (Marty 2026-11-18: tutorial explainer videos for each rebuilt site)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -12,7 +12,7 @@
|
||||
const core = require('./chatcore');
|
||||
const C = require('./config').get();
|
||||
|
||||
const KNOWLEDGE_DATE = '2026-11-17';
|
||||
const KNOWLEDGE_DATE = '2026-11-18';
|
||||
const weekend = require('./weekend');
|
||||
const URL_ = 'https://' + C.site;
|
||||
const SUPPORT = 'https://instantadpay.com/support';
|
||||
@@ -93,6 +93,7 @@ const FACTS = () => [
|
||||
'- SPLIT (DraftPosition constants, no owner withdraw): sponsor ' + SP.sponsorPct + '%, levels 2-5 ' + SP.levelPct + '% each, Best Coach pot ' + SP.potPct + '%, company ' + SP.companyPct + '%, same transaction. Pass-up: only position holders receive; the first holder up the line gets the ' + SP.sponsorPct + '%, the next four ' + SP.levelPct + '% each, within ' + SP.maxDepth + ' places; an unclaimed level share goes to the company; the pot share always goes to the pot. A failed send waits in the contract for its owner to claim. Sponsor line from the network hub, signed on the first position and recorded link by link, never changed.',
|
||||
'- BEST COACH POT: ' + SP.potPct + '% of every position to a prize wallet fixed in the contract; each Central week shared among the coaches whose picks started the most (places ' + POT + ' percent; tie = got there first), announced on the board, every payout on the ledger. Prizes depend on that week\'s pot, never promised. Boards also show Rookie of the Week and last week\'s top 3.',
|
||||
'- CARDS: Rookie (drafted), Starter (wallet), Pro (payouts on), All-Star (first purchase), Hall of Fame (holds a position of their own). Public cards show milestones, never earnings; scouting earnings show to coaches only.',
|
||||
'- VIDEO (2026-11-18): a short walkthrough video (the pool, positions, draft day, coaching on My Team, started picks and cards, Best Coach, where to start) is on ' + URL_ + '/guides/how-the-draft-works.',
|
||||
'- GUIDES (plain-word pages, send people there for detail): ' + URL_ + '/guides (index), /guides/how-the-draft-works, /guides/is-5xyourteam-legit (contract, ledger, split), /guides/coaching-your-picks, /guides/faq.',
|
||||
'- PAGES: / (pool, tracker, standings), /join (buy), /guides, /team (coaching), /cards, /builder (CryptoTeamBuild builder, third-party programs), /promote, /ledger, /contract, /terms, /disclaimer, /privacy. Run by TrustClickz.',
|
||||
(weekend.live() ? '- NETWORK WEEKEND (live now, Black Friday to Cyber Monday, Fri 11-27 to Mon 11-30, midnight to midnight Central): every position bought in the window comes with ' + weekend.weekendPicks() + ' instant picks instead of ' + PO.picksOnBuy + ', same $' + PO.usd + ' price. This overrides the ' + PO.picksOnBuy + ' picks above until Tuesday 12-01 00:00 Central. Every network deal: https://instantadpay.com/weekend' : null),
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="admin">
|
||||
<main class="wrap">
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
@@ -221,3 +221,9 @@ footer.foot p{margin:4px 0}footer.foot a{color:var(--gold)}footer.foot .here{col
|
||||
/* staging test mode strip (DRAFT_LIVE not 1) */
|
||||
.testmode{background:#ffc93c;color:#0b1530;font-size:14px;padding:8px 0;border-bottom:2px solid #0b1530}
|
||||
.testmode b{letter-spacing:.04em}
|
||||
|
||||
/* tutorial video (2026-11-18): home watch link + the player on the how-it-works guide */
|
||||
.watchlink{display:inline-flex;align-items:center;gap:8px;margin-top:12px;font-weight:600;color:var(--gold);text-decoration:underline;text-underline-offset:3px}
|
||||
.watchlink svg{flex:none}
|
||||
.howvid video{display:block;width:100%;height:auto;aspect-ratio:16/9;border:1px solid var(--line);background:#07102a}
|
||||
.howvid p{margin:0}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="builder">
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="legal">
|
||||
<main class="wrap legal">
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="guides">
|
||||
<main class="wrap legal">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="guides">
|
||||
<main class="wrap legal">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="guides">
|
||||
<main class="wrap legal">
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="guides">
|
||||
<main class="wrap legal">
|
||||
<section><p class="kicker"><a href="/guides">GUIDES</a> · HOW IT WORKS</p><h1 style="font-size:44px">How The Draft works</h1><p class="muted">Coaches draft people who joined the network without a sponsor, every week, then help them get started.</p></section>
|
||||
<section class="card howvid" id="watch"><h2 id="watchTitle">Watch how it works</h2><video controls playsinline preload="none" poster="/art/how-it-works.jpg?v=20261118a" width="1920" height="1080" aria-describedby="watchNote"><source src="/art/how-it-works.mp4?v=20261118a" type="video/mp4"></video><p class="muted" id="watchNote">A short walkthrough in Marty's voice: the pool, positions, draft day, coaching on My Team, started picks and trading cards, Best Coach, and where to start.</p></section>
|
||||
<section class="card"><h2>The short version</h2><p>A $10 one-time position (paid in POL, never a subscription) makes you a coach. It gives you 5 picks right away and a spot in every weekly draft. Each pick becomes yours to sponsor and coach through site messages. Special network events can add extra instant picks; the <a href="/join">join page</a> shows the current number.</p></section>
|
||||
<section class="card"><h2>Who is in the pool</h2><p>The pool is the network's holding tank: people who joined without a sponsor. A pick is an adoption under the network's holding-tank rules. These people are never in the pool:</p><ul><li>anyone locked on a network contract</li><li>anyone who already has a sponsor</li><li>anyone who has already been adopted twice</li><li>spam or throwaway sign-ups</li><li>anyone in their first 24 hours after signing up</li></ul></section>
|
||||
<section class="card"><h2>Draft day</h2><p>The draft runs every Monday at 7 PM Central, 5 rounds, in straight order (the same earned order every round).</p><ul><li>When it is your turn and you are on the draft board page, you get a 90-second clock to pick.</li><li>If you are away, you are auto-picked at once: the first available player on your own queue, or else the best available player by scouting score.</li><li>A coach who already has 10 open picks is skipped for that slot.</li><li>The draft ends when every round is made or the pool runs out.</li><li>If the site is down and a draft would start more than 6 hours late, that week's draft is skipped, never run late.</li></ul></section>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="guides">
|
||||
<main class="wrap legal">
|
||||
|
||||
+3
-2
@@ -19,14 +19,15 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero">
|
||||
<div class="copy"><p class="kicker" id="heroKick">THE DRAFT</p><h1 id="heroTitle">Draft your team every Monday.</h1>
|
||||
<p class="lead">Draft order is earned: the coaches who got the most of last week's picks started pick first. Help your picks get going and you move up next Monday.</p>
|
||||
<p class="clock" id="heroClock" hidden></p></div>
|
||||
<p class="clock" id="heroClock" hidden></p>
|
||||
<a class="watchlink" href="/guides/how-the-draft-works#watch"><svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><circle cx="12" cy="12" r="11" fill="currentColor"/><path d="M10 8l6 4-6 4z" fill="#07102a"/></svg>Watch the 2-minute walkthrough</a></div>
|
||||
<div class="potbox"><span class="lab">Best Coach pot this week</span><b class="big" id="potWei">0 POL</b><span class="muted small">10% of every position sold this week</span><div class="kv" id="potRank"></div></div>
|
||||
</section>
|
||||
<p id="status" class="note" hidden></p>
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="legal">
|
||||
<main class="wrap legal">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="promote">
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;600;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/fx.css?v=4">
|
||||
</head>
|
||||
<body data-page="legal">
|
||||
<main class="wrap legal">
|
||||
|
||||
@@ -46,7 +46,7 @@ const DAY = 86400000;
|
||||
|
||||
// ---- http helpers ----
|
||||
const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'text/javascript', '.png': 'image/png', '.jpg': 'image/jpeg',
|
||||
'.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml' };
|
||||
'.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml', '.mp4': 'video/mp4', '.webm': 'video/webm' };
|
||||
const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://linkspin.app https://polhunter.com; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; "
|
||||
+ "img-src 'self' data: blob: https:; connect-src 'self' https://linkspin.app https://polhunter.com https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org "
|
||||
+ "https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; "
|
||||
@@ -61,6 +61,19 @@ function sendFile(res, file, extra, code) {
|
||||
res.end(data);
|
||||
});
|
||||
}
|
||||
// video needs byte ranges (Safari will not play it without them); tutorial videos 2026-11-18
|
||||
function sendMedia(req, res, file) {
|
||||
fs.stat(file, (err, st) => {
|
||||
if (err || !st.isFile()) { res.writeHead(404, headers({ 'Content-Type': 'text/plain' })); return res.end('Not found'); }
|
||||
const base = { 'Content-Type': MIME[path.extname(file).toLowerCase()], 'Accept-Ranges': 'bytes', 'Cache-Control': 'public, max-age=86400' };
|
||||
const m = /^bytes=(\d*)-(\d*)$/.exec(req.headers.range || '');
|
||||
if (!m || (!m[1] && !m[2])) { res.writeHead(200, headers(Object.assign(base, { 'Content-Length': st.size }))); return fs.createReadStream(file).pipe(res); }
|
||||
let a = m[1] ? +m[1] : Math.max(0, st.size - +m[2]), b = m[1] && m[2] ? Math.min(+m[2], st.size - 1) : st.size - 1;
|
||||
if (a > b || a >= st.size) { res.writeHead(416, headers({ 'Content-Range': 'bytes */' + st.size })); return res.end(); }
|
||||
res.writeHead(206, headers(Object.assign(base, { 'Content-Range': 'bytes ' + a + '-' + b + '/' + st.size, 'Content-Length': b - a + 1 })));
|
||||
fs.createReadStream(file, { start: a, end: b }).pipe(res);
|
||||
});
|
||||
}
|
||||
function readRaw(req, max) {
|
||||
return new Promise((resolve, reject) => { const ch = []; let n = 0;
|
||||
req.on('data', c => { n += c.length; if (n > max * 8) { req.destroy(); return; } if (n <= max) ch.push(c); });
|
||||
@@ -243,6 +256,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/robots.txt') { res.writeHead(200, headers({ 'Content-Type': 'text/plain; charset=utf-8' })); return res.end('User-agent: *\nAllow: /\nDisallow: /team\nDisallow: /admin\nDisallow: /api/\nDisallow: /sso/\n\nSitemap: https://' + C.site + '/sitemap.xml\n'); }
|
||||
if (p.startsWith('/assets/') || p.startsWith('/art/') || p === '/favicon.ico') {
|
||||
const f = path.normalize(path.join(PUB, p === '/favicon.ico' ? '/art/icon-192.png' : p)); if (!f.startsWith(PUB + path.sep)) { res.writeHead(400); return res.end(); }
|
||||
if (/\.(mp4|webm)$/i.test(f)) return sendMedia(req, res, f);
|
||||
return sendFile(res, f);
|
||||
}
|
||||
// the Draft Day results card (1080 x 1080, rendered to PNG by tools/art.mjs for Telegram)
|
||||
|
||||
Reference in New Issue
Block a user