SubsPlease Images View

Show image preview next to the anime titles

Fra og med 04.12.2020. Se den nyeste version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name     SubsPlease Images View
// @match    https://subsplease.org/
// @version  1
// @grant    none
// @author   Odex
// @description Show image preview next to the anime titles
// @namespace https://greasyfork.org/users/712999
// ==/UserScript==

const injectImages = () => {
	setTimeout(() => {
		document.querySelectorAll(".frontpage-releases-container tr:not(.has-image)").forEach(row => {
			const img = document.createElement("img");
			const name = row.querySelector(".release-item a");
			const { previewImage } = name.dataset;
			img.setAttribute("src", previewImage);
			img.style.width = "200px";

			const td = document.createElement("td");
			td.style.paddingRight = 0;
			td.appendChild(img);

			row.insertBefore(td, row.querySelector("td:first-child"));
			row.classList.add('has-image');

			const info = row.querySelector(".release-item-time");
			info.style.verticalAlign = "top";
		});
	}, 1500);
}

// Execute
injectImages();
document.querySelector("#latest-load-more span").addEventListener("click", injectImages);