本帖最后由 maiko 于 2025-8-26 09:02 编辑
  1. // ==UserScript==
  2. // @name         论坛小面板
  3. // @icon         http://www.mjtd.com/favicon.ico
  4. // @version      0.1.3
  5. // @description  by maiko
  6. // @author       lalala
  7. // @require      https://cdn.bootcss.com/jquery/3.5.1/jquery.min.js
  8. // @match        http://www.mjtd.com/*
  9. // @match        http://bbs.mjtd.com/*
  10. // @match        http://bbs.xdcad.net/*
  11. // @match        http://www.theswamp.org/*
  12. // @match        http*://www.cadtutor.net/*
  13. // @match        http://*.lee-mac.com/*
  14. // @grant        unsafeWindow
  15. // @run-at       document-end
  16. // ==/UserScript==
  17. (function() {
  18.     'use strict';
  19.     var $ = $ || window.$;
  20.     var host = location.host;
  21.     /////////////////////////小费//////////////////////////////////
  22.     function GMaddStyle(css) {
  23.         var myStyle = document.createElement('style');
  24.         myStyle.textContent = css;
  25.         var doc = document.head || document.documentElement;
  26.         doc.appendChild(myStyle);
  27.     }
  28.     unsafeWindow.hidden_happy_monkey = function() {
  29.         var elem = document.getElementsByClassName("happy_monkey_main");
  30.         for (var i = 0; i < elem.length; i++) {
  31.             elem[i].style.cssText = "display:none";
  32.         }
  33.     };
  34.     unsafeWindow.show_happy_monkey_tao = function() {
  35.         document.getElementById("happy_monkey_tao").style.cssText = "display:block";
  36.     };
  37.     function show_xiaofei(){
  38.         if($('#happy_monkey').length==0){
  39.             GMaddStyle(`#happy_monkey{clear:both;position: fixed;display: block;left: 0px;top: 100px;}
  40.        #happy_monkey ul{padding: 0px;margin: -65px 25px;}
  41.        #happy_monkey li{list-style: none;}
  42.        #happy_monkey a{text-decoration: none;}
  43.        #happy_monkey a:hover {font-size: larger;}
  44.        .happy_monkey_head{background-color: red;color: wheat;width: 20px;border-radius: 3px;padding-left: 1px;}
  45.        .happy_monkey_main{width: 110px;background-color: yellow;cursor: pointer;border-radius: 3px;}
  46.        `);
  47.             var html = `<div for="happy_monkey_tao" onmouseover="show_happy_monkey_tao()">
  48.             <h4 class="happy_monkey_head">主题切换</h4>
  49.             <ul class="happy_monkey_main" id="happy_monkey_tao" onmouseout="hidden_happy_monkey()">
  50.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=new"
  51.             target="_blank">明经_最新回复</a></li>
  52.             <li><a href="http://bbs.mjtd.com/forum-3-1.html"
  53.             target="_blank">明经_编程技术</a></li>
  54.             <li><a href="http://bbs.mjtd.com/forum-25-1.html"
  55.             target="_blank">明经_编程申请</a></li>
  56.             <li><a href="http://bbs.mjtd.com/forum-16-1.html"
  57.             target="_blank">明经_源码共享</a></li>
  58.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=newthread"
  59.             target="_blank">明经_最新发表</a></li>
  60.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=hot"
  61.             target="_blank">明经_最新热门</a></li>
  62.             <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=13"
  63.             target="_blank">明经_通用函数</a></li>
  64.             <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=3"
  65.             target="_blank">明经_高飞鸟</a></li>
  66.             <li><a href="http://bbs.mjtd.com/forum.php?mod=forumdisplay&fid=3&filter=typeid&typeid=109"
  67.             target="_blank">明经_Gu_xl</a></li>
  68.             <li><a href="http://bbs.xdcad.net/forum-260-1.html"
  69.             target="_blank">晓东_开源库</a></li>
  70.             <li><a href="http://bbs.xdcad.net/forum.php?mod=forumdisplay&fid=14&filter=typeid&typeid=226"
  71.             target="_blank">晓东_每日一码</a></li>
  72.             </ul>
  73.             </div>`;
  74.             var div = document.createElement('div');
  75.             div.id="happy_monkey";
  76.             div.innerHTML = html;
  77.             document.body.append(div);
  78.             unsafeWindow.hidden_happy_monkey();
  79.         }
  80.         //setTimeout(show_xiaofei,2500);
  81.     }
  82.     show_xiaofei();
  83.     document.body.addEventListener('DOMNodeInserted',function() {
  84.         show_xiaofei();
  85.     })
  86. })();
复制代码




网友答: 换了个颜色样式。
  1. if($('#happy_monkey').length==0){
  2.             GMaddStyle(`
  3.           /* ===== 猴子导航栏容器 ===== */
  4. #happy_monkey {
  5.   position: fixed;
  6.   display: block;
  7.   left: 0;
  8.   top: 100px;
  9.   z-index: 1000;
  10.   filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.12)); /* 增强投影深度 */
  11. }

  12. /* ===== 列表整体样式 ===== */
  13. #happy_monkey ul {
  14.   padding: 0;
  15.   margin: -65px 25px;
  16.   display: flex;
  17.   flex-direction: column;
  18.   gap: 12px; /* 增加项间距 */
  19. }

  20. /* ===== 列表项样式 ===== */
  21. #happy_monkey li {
  22.   list-style: none;
  23.   transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  24. }

  25. #happy_monkey li:hover {
  26.   transform: translateX(8px);
  27.   filter: brightness(110%);
  28. }

  29. /* ===== 链接基础样式 ===== */
  30. #happy_monkey a {
  31.   display: flex;
  32.   align-items: center;
  33.   text-decoration: none;
  34.   font-family: 'Segoe UI', 'SF Pro Display', system-ui, sans-serif;
  35.   font-weight: 600;
  36.   border-radius: 8px; /* 更大圆角 */
  37.   overflow: hidden;
  38.   padding: 8px 12px;
  39.   background-color: #ffffff; /* 改为白色背景 */
  40.   box-shadow:
  41.     0 4px 8px rgba(0, 0, 0, 0.07),
  42.     inset 0 0 0 1px rgba(255, 255, 255, 0.2); /* 内发光效果 */
  43.   transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  44.   color: #333; /* 字体颜色 */
  45. }

  46. /* ===== 链接悬停动效 ===== */
  47. #happy_monkey a:hover {
  48.   transform: scale(1.03);
  49.   box-shadow:
  50.     0 8px 16px rgba(0, 0, 0, 0.15),
  51.     inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  52.   background-color: #f0f4f8; /* 悬停背景色 */
  53. }

  54. /* ===== 头部指示器样式 ===== */
  55. .happy_monkey_head {
  56.   background: linear-gradient(135deg, #d94040 0%, #BA350F 100%); /* 渐变色调更温暖 */
  57.   color: rgba(255, 255, 255, 0.95);
  58.   width: 20px;
  59.   padding: 12px 4px;
  60.   display: flex;
  61.   align-items: center;
  62.   justify-content: center;
  63.   font-size: 1em;
  64.   font-weight: 700;
  65.   text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  66.   border-radius: 4px;
  67.   margin-bottom: 8px;
  68. }

  69. /* ===== 主内容区块样式 ===== */
  70. .happy_monkey_main {
  71.   background: linear-gradient(to right,
  72.     rgba(255, 255, 255, 0.98) 0%,
  73.     rgba(240, 245, 255, 0.96) 100%);
  74.   color: #2D3748;
  75.   width: 140px;
  76.   padding: 12px 16px;
  77.   cursor: pointer;
  78.   white-space: nowrap;
  79.   border-left: 2px solid rgba(0, 0, 0, 0.05);
  80.   position: relative;
  81.   font-size: 1em;
  82.   transition: all 0.3s ease;
  83.   box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  84.   border-radius: 6px;
  85. }

  86.        `);
复制代码






网友答: AI各种魔改
翻译不乱码、加字体、颜色
  1. // ==UserScript==
  2. // @name         明经通道论坛小面板
  3. // @namespace    http://tampermonkey.net/
  4. // @version      1.0.3
  5. // @description  在所有网站显示明经通道论坛导航面板,蓝色标注晓东链接,红色标注国外链接
  6. // @author       maiko
  7. // @icon         http://www.mjtd.com/favicon.ico
  8. // @require      https://code.jquery.com/jquery-3.6.0.min.js
  9. // @grant        GM_addStyle
  10. // @grant        GM_addElement
  11. // @run-at       document-end
  12. // @match        *://*/*
  13. // ==/UserScript==

  14. (function() {
  15. 'use strict';

  16. // 防止翻译的元字符保护
  17. GM_addElement('head', 'meta', {
  18.     charset: 'utf-8',
  19.     name: 'google',
  20.     content: 'notranslate'
  21. });

  22. // 添加面板样式 - 包含防翻译保护和链接颜色样式
  23. const panelStyle = `
  24. #happy_monkey,
  25. #happy_monkey * {
  26.   font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif !important;
  27.   text-transform: none !important;
  28.   unicode-bidi: normal !important;
  29. }

  30. #happy_monkey {
  31.   position: fixed;
  32.   left: 0;
  33.   top: 100px;
  34.   z-index: 10000;
  35.   filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.12));
  36.   transition: all 0.3s ease;
  37. }

  38. .happy_monkey_head {
  39.   background: linear-gradient(135deg, #d94040 0%, #BA350F 100%);
  40.   color: rgba(255, 255, 255, 0.95) !important;
  41.   width: 20px;
  42.   padding: 12px 4px;
  43.   display: flex;
  44.   align-items: center;
  45.   justify-content: center;
  46.   font-size: 1em;
  47.   font-weight: 700;
  48.   text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  49.   border-radius: 4px;
  50.   margin-bottom: 8px;
  51.   writing-mode: vertical-lr;
  52.   text-orientation: upright;
  53.   letter-spacing: 0.5em;
  54.   line-height: 1.8;
  55.   cursor: pointer;
  56.   transition: all 0.3s ease;
  57. }

  58. .happy_monkey_head:hover {
  59.   transform: translateX(5px);
  60. }

  61. .happy_monkey_main {
  62.   background: linear-gradient(to right, rgba(255, 255, 255, 0.98) 0%, rgba(240, 245, 255, 0.96) 100%);
  63.   color: #2D3748 !important;
  64.   width: 140px;
  65.   padding: 12px 16px;
  66.   cursor: pointer;
  67.   border-left: 2px solid rgba(0, 0, 0, 0.05);
  68.   position: absolute;
  69.   left: 30px;
  70.   top: 0;
  71.   font-size: 1em;
  72.   transition: all 0.3s ease;
  73.   box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  74.   border-radius: 6px;
  75.   opacity: 0;
  76.   transform: translateX(-10px);
  77.   pointer-events: none;
  78. }

  79. .happy_monkey_main.visible {
  80.   opacity: 1;
  81.   transform: translateX(0);
  82.   pointer-events: auto;
  83. }

  84. #happy_monkey ul {
  85.   padding: 0;
  86.   margin: 0;
  87.   display: flex;
  88.   flex-direction: column;
  89.   gap: 8px;
  90. }

  91. #happy_monkey li {
  92.   list-style: none;
  93.   transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  94. }

  95. #happy_monkey li:hover {
  96.   transform: translateX(8px);
  97.   filter: brightness(110%);
  98. }

  99. #happy_monkey a {
  100.   display: flex;
  101.   align-items: center;
  102.   text-decoration: none !important;
  103.   font-family: 'Microsoft YaHei', '微软雅黑', sans-serif !important;
  104.   font-weight: 600;
  105.   border-radius: 8px;
  106.   overflow: hidden;
  107.   padding: 8px 12px;
  108.   background-color: #ffffff;
  109.   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  110.   transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  111.   color: #333 !important;
  112.   font-size: 12px !important;
  113. }

  114. #happy_monkey a:hover {
  115.   transform: scale(1.03);
  116.   box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  117.   background-color: #f0f4f8;
  118. }

  119. /* 晓东链接特殊样式 - 蓝色文字 */
  120. #happy_monkey a.xiaodong-link {
  121.   color: #1976D2 !important;  /* 深蓝色 */
  122. }

  123. #happy_monkey a.xiaodong-link:hover {
  124.   color: #0D47A1 !important;  /* 悬停时更深的蓝色 */
  125. }

  126. /* 国外链接特殊样式 - 红色文字 */
  127. #happy_monkey a.foreign-link {
  128.   color: #D32F2F !important;  /* 深红色 */
  129. }

  130. #happy_monkey a.foreign-link:hover {
  131.   color: #B71C1C !important;  /* 悬停时更深的红色 */
  132. }
  133. `;

  134. // 添加样式到页面
  135. GM_addStyle(panelStyle);

  136. // 创建面板HTML - 添加notranslate类保护和链接特殊类
  137. const panelHTML = `
  138. <div id="happy_monkey" class="notranslate">
  139.   <div class="happy_monkey_head notranslate">明经通道LISP快速导航</div>
  140.   <ul class="happy_monkey_main notranslate" id="happy_monkey_tao">
  141.     <li><a href="http://bbs.mjtd.com/forum-3-1.html" target="_blank" class="notranslate">明经_编程技术</a></li>
  142.     <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=new" target="_blank" class="notranslate">明经_最新回复</a></li>
  143.     <li><a href="http://bbs.mjtd.com/forum-25-1.html" target="_blank" class="notranslate">明经_编程申请</a></li>
  144.     <li><a href="http://bbs.mjtd.com/forum-16-1.html" target="_blank" class="notranslate">明经_源码共享</a></li>
  145.     <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=newthread" target="_blank" class="notranslate">明经_最新发表</a></li>
  146.     <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=hot" target="_blank" class="notranslate">明经_最新热门</a></li>
  147.     <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=13" target="_blank" class="notranslate">明经_通用函数</a></li>
  148.     <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=3" target="_blank" class="notranslate">明经_高飞鸟</a></li>
  149.     <li><a href="http://bbs.mjtd.com/forum.php?mod=forumdisplay&fid=3&filter=typeid&typeid=109" target="_blank" class="notranslate">明经_Gu_xl</a></li>
  150.     <li><a href="http://www.mjtd.com/home.php?mod=space&uid=396777&do=thread&type=thread&view=me&from=space" target="_blank" class="notranslate">明经_大海</a></li>

  151.     <!-- 添加晓东链接特殊类 -->
  152.     <li><a href="http://bbs.xdcad.net/forum-260-1.html" target="_blank" class="notranslate xiaodong-link">晓东_开源库</a></li>
  153.     <li><a href="http://bbs.xdcad.net/forum.php?mod=forumdisplay&fid=14&filter=typeid&typeid=226" target="_blank" class="notranslate xiaodong-link">晓东_每日一码</a></li>

  154.     <!-- 添加外国链接特殊类 -->
  155.     <li><a href="https://www.theswamp.org/" target="_blank" class="notranslate foreign-link">国外_theswamp</a></li>
  156.     <li><a href="https://www.lee-mac.com/tabsort.html" target="_blank" class="notranslate foreign-link">国外_lee-mac</a></li>
  157.     <li><a href="https://www.afralisp.net/" target="_blank" class="notranslate foreign-link">国外_afralisp</a></li>
  158.   </ul>
  159. </div>
  160. `;

  161. // 添加面板到页面
  162. $('body').append(panelHTML);

  163. // 面板显示/隐藏功能
  164. let panelTimeout;

  165. $('.happy_monkey_head').hover(
  166.   function() {
  167.     clearTimeout(panelTimeout);
  168.     $('#happy_monkey_tao').addClass('visible');
  169.   },
  170.   function() {
  171.     panelTimeout = setTimeout(() => {
  172.       $('#happy_monkey_tao').removeClass('visible');
  173.     }, 300);
  174.   }
  175. );

  176. $('#happy_monkey_tao').hover(
  177.   function() {
  178.     clearTimeout(panelTimeout);
  179.     $(this).addClass('visible');
  180.   },
  181.   function() {
  182.     $(this).removeClass('visible');
  183.   }
  184. );

  185. // 初始隐藏菜单
  186. $('#happy_monkey_tao').removeClass('visible');

  187. // 面板拖动功能
  188. let isDragging = false;
  189. let offsetX, offsetY;

  190. $('#happy_monkey').mousedown(function(e) {
  191.   if (e.target.classList.contains('happy_monkey_head')) {
  192.     isDragging = true;
  193.     offsetX = e.clientX - $(this).offset().left;
  194.     offsetY = e.clientY - $(this).offset().top;
  195.   }
  196. });

  197. $(document).mousemove(function(e) {
  198.   if (isDragging) {
  199.     $('#happy_monkey').css({
  200.       left: (e.clientX - offsetX) + 'px',
  201.       top: (e.clientY - offsetY) + 'px'
  202.     });
  203.   }
  204. });

  205. $(document).mouseup(function() {
  206.   isDragging = false;
  207. });
  208. })();


网友答: AI改一下,所有网站都显示这个导航工具条

  1. // ==UserScript==
  2. // @name         明经通道论坛小面板
  3. // @icon         http://www.mjtd.com/favicon.ico
  4. // @version      0.1.4
  5. // @description  by maiko
  6. // @author       lalala
  7. // @require      https://cdn.bootcss.com/jquery/3.5.1/jquery.min.js
  8. // @grant        unsafeWindow
  9. // @run-at       document-end
  10. // @match        *://*/*
  11. // ==/UserScript==

  12. (function() {
  13.     'use strict';
  14.     var $ = $ || window.$;
  15.     var host = location.host;
  16.     /////////////////////////小费//////////////////////////////////
  17.     function GMaddStyle(css) {
  18.         var myStyle = document.createElement('style');
  19.         myStyle.textContent = css;
  20.         var doc = document.head || document.documentElement;
  21.         doc.appendChild(myStyle);
  22.     }
  23.     unsafeWindow.hidden_happy_monkey = function() {
  24.         var elem = document.getElementsByClassName("happy_monkey_main");
  25.         for (var i = 0; i < elem.length; i++) {
  26.             elem[i].style.cssText = "display:none";
  27.         }
  28.     };
  29.     unsafeWindow.show_happy_monkey_tao = function() {
  30.         document.getElementById("happy_monkey_tao").style.cssText = "display:block";
  31.     };
  32.     function show_xiaofei(){
  33.         if($('#happy_monkey').length==0){
  34.             GMaddStyle(`#happy_monkey{clear:both;position: fixed;display: block;left: 0px;top: 100px;}
  35.        #happy_monkey ul{padding: 0px;margin: -65px 25px;}
  36.        #happy_monkey li{list-style: none;}
  37.        #happy_monkey a{text-decoration: none;}
  38.        #happy_monkey a:hover {font-size: larger;}
  39.        .happy_monkey_head{background-color: red;color: wheat;width: 20px;border-radius: 3px;padding-left: 1px;}
  40.        .happy_monkey_main{width: 110px;background-color: yellow;cursor: pointer;border-radius: 3px;}
  41.        `);
  42.             var html = `<div for="happy_monkey_tao" onmouseover="show_happy_monkey_tao()">
  43.             <h4 class="happy_monkey_head">明经通道<br> L<br> I<br> S<br> P<br>主题切换</h4>
  44.             <ul class="happy_monkey_main" id="happy_monkey_tao" onmouseout="hidden_happy_monkey()">
  45.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=new"
  46.             target="_blank">明经_最新回复</a></li>
  47.             <li><a href="http://bbs.mjtd.com/forum-3-1.html"
  48.             target="_blank">明经_编程技术</a></li>
  49.             <li><a href="http://bbs.mjtd.com/forum-25-1.html"
  50.             target="_blank">明经_编程申请</a></li>
  51.             <li><a href="http://bbs.mjtd.com/forum-16-1.html"
  52.             target="_blank">明经_源码共享</a></li>
  53.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=newthread"
  54.             target="_blank">明经_最新发表</a></li>
  55.             <li><a href="http://bbs.mjtd.com/forum.php?mod=guide&view=hot"
  56.             target="_blank">明经_最新热门</a></li>
  57.             <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=13"
  58.             target="_blank">明经_通用函数</a></li>
  59.             <li><a href="http://bbs.mjtd.com/forum.php?mod=collection&action=view&ctid=3"
  60.             target="_blank">明经_高飞鸟</a></li>
  61.             <li><a href="http://bbs.mjtd.com/forum.php?mod=forumdisplay&fid=3&filter=typeid&typeid=109"
  62.             target="_blank">明经_Gu_xl</a></li>
  63.             <li><a href="http://bbs.xdcad.net/forum-260-1.html"
  64.             target="_blank">晓东_开源库</a></li>
  65.             <li><a href="http://bbs.xdcad.net/forum.php?mod=forumdisplay&fid=14&filter=typeid&typeid=226"
  66.             target="_blank">晓东_每日一码</a></li>
  67.             </ul>
  68.             </div>`;
  69.             var div = document.createElement('div');
  70.             div.id="happy_monkey";
  71.             div.innerHTML = html;
  72.             document.body.append(div);
  73.             unsafeWindow.hidden_happy_monkey();
  74.         }
  75.         //setTimeout(show_xiaofei,2500);
  76.     }
  77.     show_xiaofei();
  78.     document.body.addEventListener('DOMNodeInserted',function() {
  79.         show_xiaofei();
  80.     })
  81. })();
复制代码





网友答: 本帖最后由 czb203 于 2025-8-26 15:00 编辑

找了半天原来这里~

网友答: 安装了,但是这个有什么区别?没有看出来呀

网友答: 就这效果,


网友答:
czb203 发表于 2025-8-26 10:34
安装了,看不懂什么效果呀

要后台网上下载库,慢一点吧,可能过伙就好了

网友答:
maiko 发表于 2025-8-26 10:46
要后台网上下载库,慢一点吧,可能过伙就好了

大佬,接个图看下,我都不懂哪些地方变化

网友答: 可以换这个cdn试试.
  1. // @require      https://gcore.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
复制代码


网友答:
yanshengjiang 发表于 2025-8-29 11:59
AI改一下,所有网站都显示这个导航工具条


            明经通道LISP快速导航
        

                
  • 明经_最新回复
                
  • 明经_编程技术
                
  • 明经_编程申请
                
  • 明经_源码共享
                
  • 明经_最新发表
                
  • 明经_最新热门
                
  • 明经_通用函数
                
  • 明经_高飞鸟
                
  • 明经_Gu_xl
                
  • 晓东_开源库
                
  • 晓东_每日一码
            
   
   
  • 上一篇:分享一个能统一标注的箭头大小和字体高度小插
  • 下一篇:没有了