const fs = require('fs');
let html = fs.readFileSync('index.html', 'utf8');

// Remove sidebar links that didn't exist yesterday
html = html.replace(/<li data-view="subcontracts".*?<\/li>\s*/g, '');
html = html.replace(/<li data-view="subcontract-abstracts".*?<\/li>\s*/g, '');
html = html.replace(/<li data-view="client-abstracts".*?<\/li>\s*/g, '');
html = html.replace(/<li data-view="project-costs".*?<\/li>\s*/g, ''); // not sure, but let's remove it to be safe
html = html.replace(/<li data-view="project-reports".*?<\/li>\s*/g, ''); // maybe today?

// Remove storekeepers dashboard section
html = html.replace(/<div id="storekeepers-dashboard-section"[\s\S]*?<\/table>\s*<\/div>\s*<\/div>/g, '');

fs.writeFileSync('index.html', html, 'utf8');
console.log('Made index.html match yesterday');
