Use querySelectorAll instead of getElementsByClassName

pull/45/head
Nikita Karamov 2022-02-10 22:19:54 +01:00
parent 9a6f39af4a
commit 51a7597235
No known key found for this signature in database
GPG Key ID: 3C8E688C96EEB9C9
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ const openUrl = (buttonUrl) => () => {
};
const initializeShareon = () => {
const shareonContainers = document.getElementsByClassName("shareon");
const shareonContainers = document.querySelectorAll(".shareon");
// iterate over <div class="shareon">
for (let i = 0; i < shareonContainers.length; i += 1) {