// ==UserScript== // @name kbin-unsquash // @namespace https://github.com/aclist/ // @description unsquash inline images in comments // @author aclist // @version 0.0.3 // @include https://kbin.social/* // @license GNU-V3.0 // @downloadURL none // ==/UserScript== const itemsSelector = 'figure a.thumb img'; function swapImg(item) { var p = item.parentElement.href; item.src = p; item.style.cssText += 'max-width: 50%; max-height: 50%'; } function checkItems(selector) { const items = document.querySelectorAll(selector); items.forEach((item) => { swapImg(item); }); } checkItems(itemsSelector);