Extractor Button

Agrega un botón de extractor a https://www.xvideos.com/profileslist

נכון ליום 03-06-2023. ראה הגרסה האחרונה.

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

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==
// @license MIT
// @name         Extractor Button
// @namespace    https://www.example.com
// @version      1.0
// @description  Agrega un botón de extractor a https://www.xvideos.com/profileslist
// @author       Tu Nombre
// @match        https://www.xvideos.com/profileslist
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Función para mostrar la ventana de solicitud de palabras clave
    function showPrompt() {
        var keywords = prompt('Ingrese la palabra o grupo de palabras de interés:');
        if (keywords) {
            extractUsernames(keywords);
        }
    }

    // Función para extraer los nombres de usuario y verificar las palabras clave
    function extractUsernames(keywords) {
        var usernameElements = document.querySelectorAll('.profile-name a'); // Selector que apunta a los enlaces dentro de los elementos con la clase "profile-name"

        var matchingUsernames = [];

        for (var i = 0; i < usernameElements.length; i++) {
            var username = usernameElements[i].textContent.trim();

            // Verificar si el nombre de usuario contiene las palabras clave (ignorando mayúsculas y minúsculas)
            if (username.toLowerCase().includes(keywords.toLowerCase())) {
                matchingUsernames.push(username);
            }
        }

        if (matchingUsernames.length > 0) {
            var message = 'Nombres de usuario encontrados:\n\n' + matchingUsernames.join('\n');
            alert(message);
        } else {
            alert('No se encontraron nombres de usuario que coincidan con las palabras clave.');
        }
    }

    // Crear el botón
    var button = document.createElement('button');
    button.innerText = 'Extractor';

    // Estilo del botón
    button.style.position = 'fixed';
    button.style.top = '20px';
    button.style.right = '20px';
    button.style.zIndex = '9999';
    button.style.padding = '10px 20px';
    button.style.background = '#4285f4';
    button.style.color = 'white';
    button.style.border = 'none';
    button.style.borderRadius = '4px';
    button.style.cursor = 'pointer';

    // Agregar evento clic al botón
    button.addEventListener('click', showPrompt);

    // Agregar el botón al documento
    document.body.appendChild(button);
})();