Coomer Card Resize

Resize card list and add margin

Verze ze dne 26. 02. 2025. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Coomer Card Resize
// @namespace   Violentmonkey Scripts
// @match       https://coomer.su/*
// @version     1.1
// @author      -
// @description Resize card list and add margin
// @grant       none
// ==/UserScript==

(function () {
  "use strict";
  
  function updateCardSize() {
    const cardList = document.querySelector(".card-list__items");
    if (cardList) {
      cardList.style.setProperty("--card-size", "400px");
      cardList.style.gap = "3.3em"; // Adds space between the images
      console.log("Card size and margin updated!");
    } else {
      console.log("Element not found, retrying...");
      setTimeout(updateCardSize, 500); // Retry after 500ms in case content loads dynamically
    }
  }

  updateCardSize();
})();