Browse Source

Add HowToGeek

master
Juhani Krekelä 8 months ago
parent
commit
94c6236613
  1. 18
      data_pagespeed_lazy_src.js

18
data_pagespeed_lazy_src.js

@ -0,0 +1,18 @@
// ==UserScript==
// @name data-pagespeed-lazy-src Image Fixer
// @version 1
// @grant none
// @match https://www.howtogeek.com/*
// ==/UserScript==
function fixImages() {
for (let img of document.getElementsByTagName('img')) {
let imgUrl = img.getAttribute('data-pagespeed-lazy-src');
if (imgUrl) {
img.setAttribute('src', imgUrl);
img.style.height = 'auto';
}
}
}
fixImages();
Loading…
Cancel
Save