BuiltWith Summary Panel

Show condensed BuiltWith.com summary panel in the top right corner with animations and improved font styling

  1. // ==UserScript==
  2. // @name BuiltWith Summary Panel
  3. // @version 0.4
  4. // @license MIT
  5. // @author nov0id
  6. // @description Show condensed BuiltWith.com summary panel in the top right corner with animations and improved font styling
  7. // @match *://*/*
  8. // @grant GM_xmlhttpRequest
  9. // @connect builtwith.com
  10. // @namespace https://rainbowlabllc.com/
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const site = window.location.hostname.replace(/^www\./, '');
  17. const bwUrl = `https://builtwith.com/${site}`;
  18.  
  19. // Create invisible hover target
  20. const hoverTarget = document.createElement('div');
  21. hoverTarget.style.position = 'fixed';
  22. hoverTarget.style.top = '10px';
  23. hoverTarget.style.right = '0';
  24. hoverTarget.style.width = '10px';
  25. hoverTarget.style.height = '33vh';
  26. hoverTarget.style.zIndex = 9998;
  27. hoverTarget.style.cursor = 'pointer';
  28. document.body.appendChild(hoverTarget);
  29.  
  30. const panel = document.createElement('div');
  31. panel.style.position = 'fixed';
  32. panel.style.top = '10px';
  33. panel.style.right = '-300px';
  34. panel.style.width = '300px';
  35. panel.style.maxHeight = '33vh';
  36. panel.style.overflowY = 'auto';
  37. panel.style.backgroundColor = 'rgba(0, 0, 0, 0.85)';
  38. panel.style.color = 'white';
  39. panel.style.zIndex = 9999;
  40. panel.style.borderRadius = '8px';
  41. panel.style.padding = '10px';
  42. panel.style.fontFamily = 'Segoe UI, Roboto, sans-serif';
  43. panel.style.fontSize = '12px';
  44. panel.style.transition = 'right 0.5s ease, opacity 0.3s ease';
  45. panel.style.opacity = '0.5';
  46. panel.style.pointerEvents = 'none';
  47.  
  48. let hideTimeout;
  49. function showPanel() {
  50. clearTimeout(hideTimeout);
  51. panel.style.right = '10px';
  52. panel.style.opacity = '1';
  53. panel.style.pointerEvents = 'auto';
  54. panel.querySelectorAll('.content-item').forEach(el => el.style.visibility = 'visible');
  55. }
  56.  
  57. function hidePanel() {
  58. hideTimeout = setTimeout(() => {
  59. panel.style.right = '-300px';
  60. panel.style.opacity = '0.5';
  61. panel.style.pointerEvents = 'none';
  62. panel.querySelectorAll('.content-item').forEach(el => el.style.visibility = 'hidden');
  63. }, 500);
  64. }
  65.  
  66. hoverTarget.addEventListener('mouseenter', showPanel);
  67. panel.addEventListener('mouseenter', showPanel);
  68. hoverTarget.addEventListener('mouseleave', hidePanel);
  69. panel.addEventListener('mouseleave', hidePanel);
  70.  
  71. const title = document.createElement('div');
  72. title.textContent = 'Tech Used (BuiltWith)';
  73. title.style.fontWeight = 'bold';
  74. title.style.marginBottom = '5px';
  75. title.style.fontSize = '13px';
  76. title.classList.add('content-item');
  77. panel.appendChild(title);
  78.  
  79. document.body.appendChild(panel);
  80.  
  81. GM_xmlhttpRequest({
  82. method: 'GET',
  83. url: bwUrl,
  84. onload: function(response) {
  85. const parser = new DOMParser();
  86. const doc = parser.parseFromString(response.responseText, 'text/html');
  87. const cards = doc.querySelectorAll('.card-body');
  88.  
  89. cards.forEach(card => {
  90. const heading = card.querySelector('h6.card-title');
  91. const techs = card.querySelectorAll('h2 a.text-dark');
  92. if (heading && techs.length) {
  93. const group = document.createElement('div');
  94. group.style.marginBottom = '8px';
  95. group.classList.add('content-item');
  96.  
  97. const cat = document.createElement('div');
  98. cat.textContent = heading.textContent;
  99. cat.style.color = '#ccc';
  100. cat.style.fontWeight = 'bold';
  101. cat.style.fontSize = '11.5px';
  102. cat.style.marginBottom = '2px';
  103. group.appendChild(cat);
  104.  
  105. techs.forEach(tech => {
  106. const t = document.createElement('div');
  107. t.textContent = '• ' + tech.textContent;
  108. group.appendChild(t);
  109. });
  110.  
  111. panel.appendChild(group);
  112. }
  113. });
  114.  
  115. // Hide text initially
  116. panel.querySelectorAll('.content-item').forEach(el => el.style.visibility = 'hidden');
  117. }
  118. });
  119. })();

QingJ © 2025

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