Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
codigoconjuan / imagenes.js
Created August 4, 2021 21:43
Gist Soporte Imagenes WebP y Avif como Background
(function (document) {
var checkCount = 0,
formatFound = false;
function setHTMLClass(height, className) {
checkCount++;
if (height == 2) {
formatFound = true;
document.documentElement.className += " " + className;
} else {
@XeanN
XeanN / imagenes.js
Created December 8, 2021 04:25 — forked from codigoconjuan/imagenes.js
Gist Soporte Imagenes WebP y Avif como Background
(function (document) {
var checkCount = 0,
formatFound = false;
function setHTMLClass(height, className) {
checkCount++;
if (height == 2) {
formatFound = true;
document.documentElement.className += " " + className;
} else {