Skip to content

Commit c097054

Browse files
committed
skip images in tables
1 parent bf70a00 commit c097054

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

javascripts/toggle-images.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ export default function () {
4141

4242
// For every image...
4343
for (const img of images) {
44+
// Ignore images in tables, which are smaller than other images.
45+
if (img.closest('table')) continue
46+
4447
const parentSpan = img.parentNode
4548
// Create a button and add some attributes.
4649
const parentButton = document.createElement('button')

0 commit comments

Comments
 (0)