(function ($) { document.addEventListener('DOMContentLoaded', function () { const content = document.getElementById('o_content'); let imageModalId = 0; content.querySelectorAll('img').forEach(image => { // Enforce the presence of the `img-fluid` class on all images. image.classList.add('img-fluid', 'img-thumbnail'); // Add a modal to each image that does not explicitly block it and has no target. if (!image.classList.contains('o-no-modal') && image.parentElement.tagName !== 'A') { const modalContainer = document.createElement('div'); modalContainer.innerHTML = `