const fs = require('fs');
['d:/برنامج مخازن/index.html', 'd:/برنامج مخازن/app_final.js', 'd:/برنامج مخازن/entities_module.js'].forEach(file => {
    const content = fs.readFileSync(file, 'utf8');
    if (content.includes("document.getElementById('user-role').addEventListener('change'")) {
        console.log(`Found listener in ${file}`);
        // Extract 30 lines after the match
        const idx = content.indexOf("document.getElementById('user-role').addEventListener('change'");
        console.log(content.substring(idx, idx + 1000));
    }
});
