There is a button, the button has an id , this button is present on every page, but on different pages, it has different id . For example, on the first page of her id buttonsd123 on another buttonsd213 . How to make the correct var , so that it buttonsd on buttonsd and what is no longer important.
Like that:
var knopka = document.getElementById('buttonsd//и тут уже любые значения') There are more than 1000 pages, because in each one there’s no need to write id buttons