Copy User Lolz Id by_el9in

Copy User Lolz Id

  1. // ==UserScript==
  2. // @name Copy User Lolz Id by_el9in
  3. // @namespace Copy User Lolz Id by_el9in
  4. // @version 0.2
  5. // @description Copy User Lolz Id
  6. // @author el9in
  7. // @match https://zelenka.guru/*
  8. // @match https://lzt.market/*
  9. // @match https://lolz.guru/*
  10. // @match https://lolz.live/*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=zelenka.guru
  12. // @grant none
  13. // @license el9in
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18. const followContainer = document.querySelector('div.followContainer') || document.querySelector('a.button.full.followContainer.OverlayTrigger');
  19. if(followContainer) {
  20. const idContainer = document.createElement('div');
  21. idContainer.className = 'idContainer';
  22. const idButton = document.createElement('a');
  23. idButton.className = 'idButton button block OverlayTrigger';
  24. idButton.setAttribute('title', '');
  25. idButton.setAttribute('id', '');
  26. idButton.setAttribute('data-cacheoverlay', 'false');
  27. idButton.textContent = 'Скопировать ID';
  28. idContainer.appendChild(idButton);
  29. followContainer.insertAdjacentElement('afterend', idContainer);
  30. idButton.addEventListener('click', function() {
  31. const userContentLinks = document.querySelector('div.userContentLinks');
  32. const firstLink = userContentLinks.querySelector('a.button:nth-child(2)');
  33. const href = firstLink.getAttribute('href');
  34. const hrefText = href.match(/\/(\d+)\//)[1];
  35. if((hrefText | 0) != 0) {
  36. const userId = hrefText | 0;
  37. navigator.clipboard.writeText(userId);
  38. }
  39. });
  40. }
  41. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址