Add IEEE Spectrum

This commit is contained in:
Juhani Krekelä 2022-02-20 18:32:40 +02:00
parent 8960e7ebce
commit e4dfd0f6c0
1 changed files with 18 additions and 0 deletions

18
data_runner_src.js Normal file
View File

@ -0,0 +1,18 @@
// ==UserScript==
// @name data-runner-src Image Fixer
// @version 1
// @grant none
// @match https://spectrum.ieee.org/*
// ==/UserScript==
function fixImages() {
for (let img of document.getElementsByTagName('img')) {
let imgUrl = img.getAttribute('data-runner-src');
if (imgUrl) {
img.setAttribute('src', imgUrl);
img.style.height = 'auto';
}
}
}
fixImages();