Resize images over 600px

Resize images over 600px to 600px

目前為 2023-07-06 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Resize images over 600px
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Resize images over 600px to 600px
// @author       udontkn0wme
// @match        *://*/*
// @icon         https://opu.peklo.biz/p/23/07/05/1688548365-c5a3a.jpg
// @license      MIT
// @grant        none


// ==/UserScript==

(function() {
    'use strict';

    const images = document.getElementsByTagName('img');

    for (let i = 0; i < images.length; i++) {
        const img = images[i];

       if (img.height > 600) {
            img.style.height = '600px';
            img.style.width = 'auto';
        }
    }

})();