LinkDash
链接聚合 + 点击分析
用户资料
+
前端开发者 · 分享技术与生活
链接列表
0
+ 添加链接
主题色
模板风格
简约
圆润
渐变
保存到本地
生成分享链接
导出点击分析 CSV
预览页面
预览
👤
johndoe
前端开发者 · 分享技术与生活
点击统计
0
总点击
0
链接数
(function() { 'use strict'; // 全局错误捕获 window.addEventListener('error', function(e) { console.error('[Global Error]', e.message, e.filename, e.lineno); }); window.addEventListener('unhandledrejection', function(e) { console.error('[Unhandled Promise]', e.reason); }); // DOM 判空保护 function safeGet(id) { var el = document.getElementById(id); if (!el) console.warn('[DOM] Missing element #' + id); return el; } // 重新应用品牌颜色到内联样式(因为某些元素使用了硬编码 color) var accent = '#6366f1'; var els = document.querySelectorAll('[style*="color:#8b8bf8"]'); for (var i = 0; i < els.length; i++) { els[i].style.color = accent; } // 重设 phone-name 颜色(可能被 JS 覆盖) var phoneName = safeGet('phoneName'); if (phoneName) phoneName.style.color = accent; // 重设 phone-avatar 边框颜色(使用带透明度的 accent) var phoneAvatar = safeGet('phoneAvatar'); if (phoneAvatar) phoneAvatar.style.borderColor = accent + '66'; // 重设所有 .phone-link 的 color 和 background document.querySelectorAll('.phone-link').forEach(function(el) { el.style.background = accent + '22'; el.style.color = accent; }); // 重设 phone-mock 背景(当前使用 bgFromAccent 但可能未及时更新) // 已有 renderPreview 会处理,此处仅作为安全兜底 // 确保 header h1 渐变使用 accent var h1 = document.querySelector('.header h1'); if (h1) { h1.style.background = 'linear-gradient(135deg, ' + accent + ', #a78bfa)'; h1.style.webkitBackgroundClip = 'text'; h1.style.webkitTextFillColor = 'transparent'; h1.style.backgroundClip = 'text'; } // 重设颜色网格中的激活 swatch 边框阴影 document.querySelectorAll('.color-swatch.active').forEach(function(el) { el.style.boxShadow = '0 0 0 2px ' + accent; }); })();