sombreros

Te puede interesar

X
( function( $ ) { this.startCovid = () => { this.setCSS('/assets/css/chilanga.css'); $($('.NavLogo')[0]).attr('href', 'https://www.chilango.com'); $($('.NavLogo > img')[0]).attr('src', 'https://img.chilango.com/chilanga/chilanga-blanco.svg'); } this.setCSS = url => { if (url.trim() != '') { let style = document.createElement('link'); document.getElementsByTagName('head')[0].appendChild(style); style.rel = 'stylesheet'; style.type = 'text/css'; style.href = url + '?v=' + Math.random(); } } this.setJS = file => { if ($('script[src="' + file + '"]').length <= 0) { let s = document.createElement('script'); s.async = true; s.setAttribute('src', file); document.body.appendChild(s); } } this.startCovid(); } ) ( jQuery );