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