mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-15 02:24:04 +00:00
SVG srcset hotfix
This commit is contained in:
parent
da7c4d5ff0
commit
36f6c94ec1
|
@ -16,7 +16,7 @@ if( typeof IntersectionObserver !== "undefined" && "forEach" in NodeList.prototy
|
|||
changes.forEach(function(change) {
|
||||
if(change.isIntersecting) {
|
||||
change.target.setAttribute("src", change.target.getAttribute("data-src"));
|
||||
if(change.target.hasAttribute("srcset")) {
|
||||
if(change.target.hasAttribute("data-srcset")) {
|
||||
change.target.setAttribute("srcset", change.target.getAttribute("data-srcset"));
|
||||
}
|
||||
observer.unobserve(change.target);
|
||||
|
|
Loading…
Reference in a new issue