Last active
October 25, 2023 13:28
-
-
Save molhanec/455d254133a43ee0804ac9dce74a82f9 to your computer and use it in GitHub Desktop.
Okoun set images max height
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Okoun set images max height | |
// @namespace https://moltools.sourceforge.net/lopuch/?n=Main.Okoun | |
// @version 1.0 | |
// @author huhlal | |
// @match https://www.okoun.cz/boards/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=okoun.cz | |
// @grant none | |
// ==/UserScript== | |
const maxHeight = '70vh'; // 70 % of browser window height | |
(function() { | |
'use strict'; | |
const imgs = document.getElementsByTagName('img') | |
for (const img of imgs) { | |
img.style.width = 'auto' | |
img.style.maxHeight = maxHeight | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment