feat(Bangumi_Topic_Share): add animated custom tooltip for action buttons, bump version to 4.6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Bangumi Topic Share
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 4.5
|
||||
// @version 4.6
|
||||
// @description Bangumi 话题分享工具:生成分享卡片,支持图片复制/下载、一键复制分享文案、可选 AI 标签
|
||||
// @author Chang ji
|
||||
// @contributor Stardream
|
||||
@@ -69,6 +69,26 @@
|
||||
.bgm-action-btn:hover:not(:disabled) { background: rgba(255,255,255,0.3); transform: scale(1.1); }
|
||||
.bgm-action-btn:disabled { opacity: 0.3; cursor: default; }
|
||||
.bgm-action-btn svg { display: block; }
|
||||
.bgm-action-btn::after {
|
||||
content: attr(data-tip);
|
||||
position: absolute;
|
||||
top: calc(100% + 10px);
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(-6px);
|
||||
background: rgba(20,20,20,0.82);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 8px;
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.18s ease, transform 0.18s ease;
|
||||
}
|
||||
.bgm-action-btn:hover:not(:disabled)::after {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
}
|
||||
|
||||
/* ===== 暗色主题 ===== */
|
||||
.share-card.dark { background: #1e1e1e; }
|
||||
@@ -211,16 +231,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="bgm-btn-row">
|
||||
<button id="bgm-copy-btn" class="bgm-action-btn" disabled title="复制图片">
|
||||
<button id="bgm-copy-btn" class="bgm-action-btn" disabled data-tip="复制图片">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
|
||||
</button>
|
||||
<button id="bgm-download-btn" class="bgm-action-btn" disabled title="下载图片">
|
||||
<button id="bgm-download-btn" class="bgm-action-btn" disabled data-tip="下载图片">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
||||
</button>
|
||||
<button id="bgm-text-btn" class="bgm-action-btn" title="复制文案">
|
||||
<button id="bgm-text-btn" class="bgm-action-btn" data-tip="复制文案">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
|
||||
</button>
|
||||
<button id="bgm-close-btn" class="bgm-action-btn" title="关闭">
|
||||
<button id="bgm-close-btn" class="bgm-action-btn" data-tip="关闭">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user