Coomer Card Resize

Resize card list and add margin

Ajankohdalta 26.2.2025. Katso uusin versio.

// ==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();
})();