I'm working on a Chrome extension that loads on top of another site, because of that I need to select some of that site's elements by class name or ID, and everything works fine until the site releases an update. Then every class name is different and some IDs may be missing or even changed. So what is the best practice to prevent my extension from breaking? Should I just keep the class names updated myself?
you may check an anchestor node that you know its properties won't change and then loop throught its inner nodes or you can periodically check for any site updates by your own and then "instruct" the extension about the nodes to be selected. This can be done through a web service that you will develop on your own server and then query through the extension