We need TW players to complete the article of the region-locked game Fingertips Breakout.
We're aware of an issue which causes comments to only appear after a long delay and are working on a solution.
You don't need an account to add and correct this Wiki. Learn how to contribute, browse Bounties and join our Discord server.

User:Messing with data/vector.js: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
m This MediaWiki doesn't allow "let"
Moved code to Gadget
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
document.addEventListener("DOMContentLoaded", function() {
$(document).ready(function() {
   var lazyImages = [].slice.call(document.querySelectorAll("img.lazy-beta"));
   console.log("No user script for vector.js implemented.");
 
  if ("IntersectionObserver" in window) {
    var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
      entries.forEach(function(entry) {
        if (entry.isIntersecting) {
          var lazyImage = entry.target;
          lazyImage.src = lazyImage.dataset.src;
          lazyImage.srcset = lazyImage.dataset.srcset;
          lazyImage.classList.remove("lazy-beta");
          lazyImageObserver.unobserve(lazyImage);
        }
      });
    });
 
    lazyImages.forEach(function(lazyImage) {
      lazyImageObserver.observe(lazyImage);
    });
  } else {
    // Possibly fall back to event handlers here
  }
});
});

Latest revision as of 00:54, 19 June 2024

$(document).ready(function() {
  console.log("No user script for vector.js implemented.");
});