// ==UserScript== // @name 喵课助手 | 网课辅助工具 // @namespace http://nb.zizizi.top/ // @version 1.1 // @description 支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】【上海开放大学】【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】等,内置题库功能。 // @author 喵课团队 // @match *://*.edu.cn/* // @match *://*.chaoxing.com/* // @match *://*.zhihuishu.com/* // @match *://*.icve.com.cn/* // @match *://*.cnmooc.org/* // @match *://*.xuetangx.com/* // @match *://*.icourse163.org/* // @match *://*.yuketang.cn/* // @match *://*.mooc.cn/* // @match *://study.163.com/* // @match *://www.bilibili.com/video/* // @match *://v.qq.com/* // @icon http://nb.zizizi.top/miaoke.ico // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @license MIT // ==/UserScript== (function() { 'use strict'; // 工具类 class MiaoKeHelper { constructor() { this.version = '1.0'; this.siteName = this.detectSite(); this.init(); } // 检测当前网站 detectSite() { const host = window.location.hostname; if (host.includes('chaoxing.com')) return '超星学习通'; if (host.includes('zhihuishu.com')) return '智慧树'; if (host.includes('icve.com.cn')) return '智慧职教'; if (host.includes('xuetangx.com')) return '学堂在线'; if (host.includes('icourse163.org')) return '中国大学MOOC'; if (host.includes('bilibili.com')) return 'B站视频'; if (host.includes('v.qq.com')) return '腾讯视频'; return '教育平台'; } // 初始化 init() { this.addStyles(); this.createUI(); this.initFeatures(); this.bindEvents(); console.log(`喵课助手已启动 - ${this.siteName}`); } // 添加样式 addStyles() { GM_addStyle(` /* 主容器样式 */ #miaoke-helper-btn { position: fixed; z-index: 9999; right: 20px; top: 100px; width: 50px; height: 50px; border-radius: 50%; background-color: #3498db; color: white; text-align: center; line-height: 50px; font-size: 24px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.2); transition: all 0.3s ease; user-select: none; } #youth-helper-btn:hover { transform: scale(1.1); box-shadow: 0 5px 15px rgba(0,0,0,0.3); } #miaoke-helper-panel { position: fixed; z-index: 9998; right: 80px; top: 100px; width: 320px; background: white; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); font-family: Arial, sans-serif; transition: all 0.3s ease; display: none; overflow: hidden; } /* 面板头部 */ .helper-header { padding: 15px; background: linear-gradient(45deg, #3498db, #2980b9); color: white; display: flex; justify-content: space-between; align-items: center; } .helper-title { margin: 0; font-size: 16px; font-weight: bold; } .helper-close { cursor: pointer; font-size: 18px; } /* 功能区 */ .helper-content { padding: 15px; max-height: 400px; overflow-y: auto; } .helper-section { margin-bottom: 20px; } .section-title { font-size: 14px; font-weight: bold; margin-bottom: 10px; color: #333; border-bottom: 1px solid #eee; padding-bottom: 5px; } .feature-btn { display: inline-block; margin: 5px; padding: 8px 12px; background: #f5f5f5; border-radius: 5px; cursor: pointer; font-size: 12px; color: #333; transition: all 0.2s; } .feature-btn:hover { background: #e0e0e0; } .feature-btn.active { background: #3498db; color: white; } /* 设置区域 */ .helper-setting { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; } .setting-label { font-size: 13px; color: #555; } .setting-input { width: 50px; text-align: center; border: 1px solid #ddd; border-radius: 3px; padding: 3px; } /* 底部 */ .helper-footer { padding: 10px 15px; background: #f5f5f5; text-align: center; font-size: 12px; color: #555; border-top: 1px solid #eee; } .helper-footer a { color: #3498db; text-decoration: none; } .helper-footer a:hover { text-decoration: underline; } /* 笔记面板 */ #note-panel { position: fixed; right: 80px; bottom: 20px; width: 300px; height: 200px; background: white; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 9997; display: none; overflow: hidden; } .note-header { padding: 10px; background: linear-gradient(45deg, #3498db, #2980b9); color: white; display: flex; justify-content: space-between; align-items: center; font-size: 14px; } .note-content { padding: 10px; height: calc(100% - 80px); } .note-textarea { width: 100%; height: 100%; border: 1px solid #ddd; border-radius: 5px; padding: 5px; resize: none; font-size: 13px; } .note-footer { padding: 5px 10px; display: flex; justify-content: flex-end; } .note-save { padding: 5px 10px; background: #3498db; color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; } /* 阅读模式 */ .reading-mode-active { background-color: #f9f9f9 !important; color: #333 !important; font-size: 16px !important; line-height: 1.6 !important; } .reading-mode-active p, .reading-mode-active div { max-width: 800px !important; margin: 0 auto !important; padding: 10px 20px !important; } /* 拖动功能 */ .draggable { cursor: move; } `); } // 创建用户界面 createUI() { // 主按钮 const btn = document.createElement('div'); btn.id = 'miaoke-helper-btn'; btn.innerHTML = '🐱'; btn.title = '喵课助手'; document.body.appendChild(btn); // 主面板 const panel = document.createElement('div'); panel.id = 'miaoke-helper-panel'; panel.innerHTML = `