// ==UserScript== // @name 内蒙古网络学院 // @namespace http://tampermonkey.net/ // @version 1.1 // @description 详情看详细说明 // @author You // @match *://*/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; // ==================== 自定义区域 ==================== const config = { title: '📬 联系与支持', contactInfo: '微信: hs1573887565', platforms: '1.呼和浩特智慧服务公共平台
' + '2.呼和浩特市玉泉区专业技术人员继续教育
' + '3.青橙优学
' + '4.内蒙古中医药(蒙医药)继续教育管理平台
' + '5.呼和浩特人事考试是信息网
' + '6.内蒙古网络学院' , showPlatforms: true, bgColor: '#ffffff', borderColor: '#d0ddeb', textColor: '#1e2a3a', closeBtnColor: '#6b7b8f', panelWidth: 460, borderRadius: 16, offset: 24, // 距顶部的距离 storageKey: 'contact_panel_closed_v1', }; // ==================================================== if (localStorage.getItem(config.storageKey) === 'true') return; const panel = document.createElement('div'); panel.id = 'tm-contact-panel'; Object.assign(panel.style, { position: 'fixed', top: config.offset + 'px', left: '50%', transform: 'translateX(-50%)', width: config.panelWidth + 'px', maxWidth: 'calc(100vw - 32px)', backgroundColor: config.bgColor, border: '1px solid ' + config.borderColor, borderRadius: config.borderRadius + 'px', boxShadow: '0 12px 28px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06)', padding: '16px 18px', fontFamily: 'system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif', fontSize: '14px', color: config.textColor, zIndex: '2147483647', lineHeight: '1.5', boxSizing: 'border-box', transition: 'opacity 0.2s ease', opacity: '0', wordBreak: 'break-word', }); let html = ''; if (config.title && config.title.trim() !== '') { html += `
${config.title}
`; } else { html += ``; } html += `
${config.contactInfo}
`; if (config.showPlatforms && config.platforms && config.platforms.trim() !== '') { html += `
继续教育
支持平台
${config.platforms}
`; } panel.innerHTML = html; document.body.appendChild(panel); setTimeout(() => { panel.style.opacity = '1'; }, 20); const closeBtn = document.getElementById('tm-close-btn'); if (closeBtn) { closeBtn.addEventListener('click', function(e) { e.stopPropagation(); panel.style.opacity = '0'; setTimeout(() => { if (panel.parentNode) panel.parentNode.removeChild(panel); // localStorage.setItem(config.storageKey, 'true'); }, 200); }); } })();