Add IEEE Spectrum
This commit is contained in:
parent
8960e7ebce
commit
e4dfd0f6c0
1 changed files with 18 additions and 0 deletions
18
data_runner_src.js
Normal file
18
data_runner_src.js
Normal 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();
|
Loading…
Reference in a new issue