Add HowToGeek

This commit is contained in:
Juhani Krekelä 2022-06-24 17:38:24 +03:00
parent f2e95a2a03
commit 94c6236613
1 changed files with 18 additions and 0 deletions

View File

@ -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();