Currently, I am tackling a freelance project focused on upgrading a website. The client is requesting specific features from their old site be replicated on the new one. However, the challenge lies in the fact that the old site's CSS and JS are consolidated in large files named "style.css" and "script.js". Thus, I am in need of a method to efficiently determine which CSS/JS rules are actually being utilized on different pages, and which ones can be safely removed.
Despite my attempts to manually sift through the code, I have been unable to cover all possible scenarios.