HindustanTimes - fetch lazy-load images immediately

Fetch lazy-load images immediately at document load

  1. // ==UserScript==
  2. // @name HindustanTimes - fetch lazy-load images immediately
  3. // @description Fetch lazy-load images immediately at document load
  4. // @include http://www.hindustantimes.com/*
  5. // @version 1.0.1
  6. // @namespace wOxxOm.scripts
  7. // @author wOxxOm
  8. // @license MIT License
  9. // @run-at document-start
  10. // @grant none
  11. // @require https://greasyfork.org/scripts/12228/code/setMutationHandler.js
  12. // ==/UserScript==
  13.  
  14. setMutationHandler(document, 'img.lazy', function(nodes) {
  15. nodes.forEach(function(n) {
  16. n.src = n.dataset.original;
  17. n.classList.remove('lazy');
  18. });
  19. return true;
  20. });