FabSwingers – Larger Video Previews

Enlarge video preview thumbnails on FabSwingers gallery pages

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         FabSwingers – Larger Video Previews
// @namespace    https://tampermonkey.net/
// @version      1.0
// @description  Enlarge video preview thumbnails on FabSwingers gallery pages
// @match        https://www.fabswingers.com/*
// @match        https://fabswingers.com/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    function applyStyles() {
        const style = document.createElement('style');
        style.textContent = `
            /* Make each grid item bigger */
            .photo-grid {
                width: 260px !important;
                height: auto !important;
                margin: 15px !important;
            }

            /* Enlarge thumbnail images */
            .photo-grid img {
                max-width: 240px !important;
                max-height: 360px !important;
                width: auto !important;
                height: auto !important;
            }

            /* Keep play icon centered and scaled nicely */
            .photo-grid img[src*="white-play"] {
                width: 64px !important;
                height: 64px !important;
            }
        `;
        document.head.appendChild(style);
    }

    // Run once page is ready
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', applyStyles);
    } else {
        applyStyles();
    }
})();