Untitled
unknown
javascript
2 years ago
240 B
10
Indexable
var preloadLinks = document.querySelectorAll('link[rel="preload"]'); preloadLinks.forEach(function(link) { var href = link.getAttribute('href'); if (href && href.endsWith('.webp')) { link.setAttribute('as', 'image'); } });
Editor is loading...