Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
for (let ibx of document.getElementsByClassName('infobox')) {
for (let img of ibx.querySelectorAll('.infobox-image')) {
let thumb = document.createElement('div');
thumb.classList.add('thumb');
thumb.classList.add('tright');
let thumbinner = document.createElement('div');
thumbinner.classList.add('thumbinner');
thumb.appendChild(thumbinner);
thumbinner.innerHTML = img.innerHTML;
ibx.parentNode.insertBefore(thumb, ibx);
}
ibx.parentNode.removeChild(ibx);
}
You must be logged in to post a comment.