/my redirector as an external script (CSP allows no inline scripts)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// The classic /my dashboard is retired (2026-10-08). Old links, emails and bookmarks carry a #pane; send each to the
|
||||
// control-room screen that replaced it. External file on purpose: the site's CSP allows no inline scripts.
|
||||
(function () {
|
||||
var M = { '': '/links', overview: '/tools', line: '/team', pipeline: '/tools#pipeline', buy: '/credits', rotator: '/links',
|
||||
campaigns: '/ads', earn: '/ads', earnings: '/credits', promo: '/tools#promo', training: '/tools#training',
|
||||
wallet: '/wallet', profile: '/tools#profile' };
|
||||
var h = (location.hash || '').slice(1).toLowerCase();
|
||||
location.replace(M.hasOwnProperty(h) ? M[h] : '/tools#' + h);
|
||||
})();
|
||||
@@ -3043,7 +3043,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/tools') return sendFile(res, path.join(PUBLIC_DIR, 'my.html')); // classic panes the control room lacks (More)
|
||||
if (p === '/my') { // retired 2026-10-08: old links/emails/bookmarks land on the right control-room screen by #pane
|
||||
res.writeHead(200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }));
|
||||
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><meta name="robots" content="noindex"></head><body><script>var M={"": "/links", "overview": "/tools", "line": "/team", "pipeline": "/tools#pipeline", "buy": "/credits", "rotator": "/links", "campaigns": "/ads", "earn": "/ads", "earnings": "/credits", "promo": "/tools#promo", "training": "/tools#training", "wallet": "/wallet", "profile": "/tools#profile"};var h=(location.hash||\'\').slice(1);location.replace(M[h]||(\'/tools#\'+h))</script><noscript><a href="/links">Open the control room</a></noscript></body></html>');
|
||||
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><meta name="robots" content="noindex"></head><body><script src="/assets/my-redirect.js?v=20261008a"></script><noscript><a href="/links">Open the control room</a></noscript></body></html>');
|
||||
}
|
||||
if (p === '/links') return sendFile(res, path.join(PUBLIC_DIR, 'links.html')); // Control Room: the links workspace, first screen of the new front end (2026-09-29)
|
||||
if (p === '/reports') return sendFile(res, path.join(PUBLIC_DIR, 'reports.html'));
|
||||
|
||||
Reference in New Issue
Block a user