Show Full Description

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

Stan na 08-11-2024. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Show Full Description
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Añade un botón para mostrar completamente el texto truncado en descripciones de perfil.
// @author       Tú
// @match        https://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
        });
    });
})();