diff --git a/content.js b/content.js index 6f8938f..3248192 100644 --- a/content.js +++ b/content.js @@ -474,7 +474,7 @@ ' font-size:14px;line-height:1.6;', '}', - /* === 进度条 === */ + '/* === 进度条 === */', '.magnet-progress-container{', ' width:100%;height:6px;background:var(--m-bg-secondary);border-radius:3px;overflow:hidden;margin-top:8px;', '}', @@ -485,9 +485,7 @@ ' display:flex;justify-content:space-between;font-size:11px;color:var(--m-text-muted);margin-top:4px;', '}', - /* === 收藏按钮 === */ - '.magnet-favorite-btn{', - /* === 收藏按钮 === */', + '/* === 收藏按钮 === */', '.magnet-favorite-btn{', ' padding:6px 10px;background:transparent;border:1px solid var(--m-border);border-radius:8px;cursor:pointer;font-size:11px;color:var(--m-text-muted);transition:all 0.2s ease;', '}', @@ -498,7 +496,7 @@ ' background:rgba(167,139,250,0.15);border-color:var(--m-accent-secondary);color:var(--m-accent-secondary);', '}', - /* === 收藏视图 === */', + '/* === 收藏视图 === */', '#magnet-favorites-view .magnet-favorite-item{', ' display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--m-bg-card);border:1px solid var(--m-border);border-radius:var(--m-radius-md);margin-bottom:8px;', '}', @@ -518,18 +516,11 @@ '#magnet-favorites-view .magnet-favorite-copy{', ' background:linear-gradient(135deg, var(--m-accent), #00f5c4);color:var(--m-bg-deep);', '}', - '}',\t '#magnet-favorites-view .magnet-favorite-remove{', + '#magnet-favorites-view .magnet-favorite-remove{', ' background:rgba(239,68,68,0.15);color:var(--m-error);', '}', - /* === 吜索记录下拉 === */ - '.magnet-history-dropdown{' - ' background:rgba(239,68,68,0.15);color:var(--m-error);', - '}', - - - /* === 吜索记录下拉 === */ - '.magnet-history-dropdown{' + '/* === 吜索记录下拉 === */', '.magnet-history-dropdown{', ' position:absolute;top:100%;left:0;right:0;background:var(--m-bg-card);border:1px solid var(--m-border);border-radius:var(--m-radius-md);box-shadow:var(--m-shadow-lg);z-index:100;max-height:200px;overflow-y:auto;', '}', @@ -575,27 +566,9 @@ renderFavoritesList(); } } - var resultsView = document.getElementById('magnet-results-view'); - var cacheView = document.getElementById('magnet-cache-view'); - var resultsBtn = document.getElementById('magnet-view-results'); - var cacheBtn = document.getElementById('magnet-view-cache'); - - if (!resultsView || !cacheView || !resultsBtn || !cacheBtn) { - return; - } - - var showCache = viewName === 'cache'; - resultsView.classList.toggle('is-active', !showCache); - cacheView.classList.toggle('is-active', showCache); - resultsBtn.classList.toggle('is-active', !showCache); - cacheBtn.classList.toggle('is-active', showCache); - } function createFloatingPanel() { var existing = document.getElementById('magnet-floating-panel'); - if (existing) return existing; - - ensurePanelStyles(); var ball = document.createElement('div'); ball.id = 'magnet-float-ball';