🎨 refactor: format JS with Prettier (#240)

This commit is contained in:
Óscar
2024-01-03 01:44:31 +01:00
committed by GitHub
parent 39fc4ece61
commit b6a89e6370
12 changed files with 93 additions and 62 deletions

View File

@@ -4,13 +4,13 @@ function initIsso() {
const commentsDiv = document.querySelector('.comments');
if (commentsDiv) {
// Get the lazy-loading setting from the div.
const lazyLoading = commentsDiv.getAttribute('data-lazy-loading') === "true";
const lazyLoading = commentsDiv.getAttribute('data-lazy-loading') === 'true';
// If lazy-loading is enabled, create an Intersection Observer and use it.
if (lazyLoading) {
const observer = new IntersectionObserver(entries => {
const observer = new IntersectionObserver((entries) => {
// Loop over the entries.
entries.forEach(entry => {
entries.forEach((entry) => {
// If the element is in the viewport, initialize Isso.
if (entry.isIntersecting) {
loadIsso(commentsDiv);