update: 2026-03-28 20:59

This commit is contained in:
2026-03-28 20:59:52 +08:00
parent e21d58e603
commit 1c81d4e6ea
611 changed files with 27847 additions and 65061 deletions

View File

@@ -0,0 +1,25 @@
const fs = require('fs');
const path = require('path');
const root = path.join(__dirname, '../public/60sapi');
const tag = '<script src="/60sapi/ig-embed.js"></script>';
function walk(dir) {
for (const f of fs.readdirSync(dir)) {
const p = path.join(dir, f);
if (fs.statSync(p).isDirectory()) walk(p);
else if (f.endsWith('.html')) {
let c = fs.readFileSync(p, 'utf8');
if (c.includes('ig-embed.js')) continue;
if (!c.includes('</head>')) {
console.warn('skip', p);
continue;
}
c = c.replace('</head>', `${tag}\n</head>`);
fs.writeFileSync(p, c, 'utf8');
console.log('ok', p);
}
}
}
walk(root);