Extractor Button

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

Verze ze dne 03. 06. 2023. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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