const slickTrack = document.querySelector(`.slick-track`);
new MutationObserver((entries) => {
entries.forEach((mutationRecord) => {
if (photosSwipedOrButtonsCLicked) return;
log('style has transition: ', mutationRecord.target.getAttribute('style').includes('transition'));
if (mutationRecord.target.getAttribute('style').includes('transition')) {
sendEvent(100322757);
photosSwipedOrButtonsCLicked = true;
} else {
log('targeted mutation does not include transition style');
}
});
}).observe(slickTrack, {
attributes: true,
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter