Hey @Monica_Scholte Thanks for explaining your use case in detail
In your case, you mentioned the site interface/layout changes, so the order of the buttons has changed.
Is the site selector also different for all the buttons? If it is the same, then Placer, a companion function to Selector would be useful for you as well.
If the site selector is not the same, then what is the relation between the buttons? Do they all look the same visually?
It seems you are using this snippet on Facebook. Can you tell which Facebook buttons you are referring to? It would be helpful to understand this better.