(btn, isFavorite)
| 507 | } |
| 508 | |
| 509 | function updateFavBtn(btn, isFavorite) { |
| 510 | let i = btn.querySelector("i"); |
| 511 | i.classList.toggle("fa-regular", !isFavorite); |
| 512 | i.classList.toggle("fa-solid", isFavorite); |
| 513 | btn.classList.toggle("active", isFavorite); |
| 514 | btn.setAttribute( |
| 515 | "data-tooltip", |
| 516 | isFavorite |
| 517 | ? t({ |
| 518 | en: "Remove from favorite", |
| 519 | vi: "Xoá khỏi yêu thích", |
| 520 | }) |
| 521 | : t({ |
| 522 | en: "Add to farovite", |
| 523 | vi: "Thêm vào yêu thích", |
| 524 | }) |
| 525 | ); |
| 526 | } |
| 527 | |
| 528 | async function updateButtonChecker(script, checkmarkContainer, val) { |
| 529 | let checkmark = checkmarkContainer.querySelector(".checkmark"); |
no test coverage detected