Show Full Description

Añade un botón para mostrar completamente el texto truncado en descripciones de perfil.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         Show Full Description
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Añade un botón para mostrar completamente el texto truncado en descripciones de perfil.
// @author       Tú
// @match        https://www.xvideos.com/profiles/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Encuentra todos los elementos que contienen las descripciones truncadas
    const descriptions = document.querySelectorAll('.p-postcomment.overflowing');

    descriptions.forEach((description) => {
        // Crea el botón para expandir el texto
        const button = document.createElement('button');
        button.innerText = 'Mostrar más';
        button.style.margin = '5px';
        button.style.cursor = 'pointer';

        // Añade el botón antes del texto truncado
        description.parentNode.insertBefore(button, description);

        // Evento de clic para mostrar el texto completo
        button.addEventListener('click', () => {
            description.style.webkitLineClamp = 'unset'; // Remueve el límite de líneas
            description.style.overflow = 'visible';      // Hace visible el contenido completo
            button.style.display = 'none';               // Oculta el botón después de expandir
        });
    });
})();