[Return]

Report a post

Preview
Here's a user script that both limits images to screen width when expanded as well as an "expand all" besides the "gallery mode" checkbox:
// ==UserScript==
// @name Insert Helpers
// @description Adds some convenience features to guro.wtf
// @match *://img.guro.wtf/*domain=guro.wtf
// @grant none
// ==/UserScript==

(function() {
'use strict';

console.log("patching guro.wtf");

let on_viewer_page = window.location.pathname.endsWith("koko.php");

let previews = Array.from(document.querySelectorAll("img.postimg"));

let expandAll = function () {
for(let x of previews) {
x.click();
}
};

let style = document.createElement("style")
style.innerText = "img.postimg { max-width: 100%; } img.expandimg { max-width: 100%; }";
document.head.appendChild(style)

let galfuncs = document.getElementById("galfuncs");
if(galfuncs) {
var btn = document.createElement("button");
btn.innerText = "Expand all";
btn.style.margin = "4px";
btn.addEventListener("click", expandAll);
galfuncs.appendChild(btn);
}
})();
Post number No.12366
Board Discussion
Optional. Describe what's wrong with it.