XHamster Retired User Search (IA) (DuckDuckGo: In site search)

Ajoute un bouton de recherche pour les utilisateurs retirés sur XHamster

// ==UserScript==
// @name         XHamster Retired User Search (IA) (DuckDuckGo: In site search)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Ajoute un bouton de recherche pour les utilisateurs retirés sur XHamster
// @author       Janvier56
// @match        https://xhamster.com/videos/*
// @icon         https://external-content.duckduckgo.com/ip3/fr.xhamster.com.ico
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  console.log('Script exécuté');
  var usernameElements = document.querySelectorAll('.video-page .body-8643e.label-5984a.label-96c3e');
  usernameElements.forEach(function(element) {
    console.log('Nom d\'utilisateur trouvé :', element.textContent.trim());
    var searchButton = document.createElement('button');
    searchButton.className = 'search-button';
    searchButton.style.background = 'green';
    searchButton.style.color = 'white';
    searchButton.style.padding = '5px 10px';
    searchButton.style.border = 'none';
    searchButton.style.borderRadius = '5px';
    searchButton.style.cursor = 'pointer';
    searchButton.style.display = 'flex';
    searchButton.style.alignItems = 'center';
    searchButton.innerHTML = '<i class="fa fa-search" style="margin-right: 5px;"></i> <img src="https://duckduckgo.com/favicon.ico" width="16" height="16">';
    searchButton.onmousedown = function(event) {
      if (event.button === 0) { // Clic gauche
        var url = 'https://duckduckgo.com/?q=' + encodeURIComponent(element.textContent.trim() + ' site:xhamster.com') + '&ia=web';
        window.location.href = url;
      } else if (event.button === 1) { // Clic milieu
        var url = 'https://duckduckgo.com/?q=' + encodeURIComponent(element.textContent.trim() + ' site:xhamster.com') + '&ia=web';
        window.open(url, '_blank');
      }
    };
    element.parentNode.appendChild(searchButton);
  });
  var style = document.createElement('style');
  style.innerHTML = `
    @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');
  `;
  document.head.appendChild(style);
})();