Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2af2955be | ||
|
|
5be9027fe7 | ||
|
|
98170e6d8a |
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
> 一键搜索 · 自动点击 · 智能评论 —— 小红书运营引流的效率神器
|
> 一键搜索 · 自动点击 · 智能评论 —— 小红书运营引流的效率神器
|
||||||
|
|
||||||
[](https://dl.88531.cn/xhs.html)
|
[](https://dl.88531.cn/xhs.html)
|
||||||
[](#安装方法)
|
[](#安装方法)
|
||||||
[](#开发说明)
|
[](#开发说明)
|
||||||
|
|
||||||
@@ -104,10 +104,22 @@
|
|||||||
|
|
||||||
## 📜 版本历史
|
## 📜 版本历史
|
||||||
|
|
||||||
当前版本:**1.8.2**
|
当前版本:**1.8.5**
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>展开查看完整变更记录(v1.2.0 ~ v1.8.2)</summary>
|
<summary>展开查看完整变更记录(v1.2.0 ~ v1.8.5)</summary>
|
||||||
|
|
||||||
|
### 1.8.5
|
||||||
|
- **标题旁显示版本号**:侧边栏顶部标题右侧新增版本徽章(如 `v1.8.5`),一眼确认装的是哪一版;页脚版本同步显示。徽章与页脚均**从 manifest 动态读取**,以后升版只需改 manifest 一处,不会再出现两处版本号不一致
|
||||||
|
|
||||||
|
### 1.8.4
|
||||||
|
- **支付成功页直接显示卡密**:只要服务端发了卡就把卡密明文展示在购买页(等宽大字 + 一键复制),**自动激活失败也照常显示**,并附手动激活指引(侧边栏「输入卡密」粘贴 → 激活)——付了钱拿不到卡密、只能找客服的情况不会再出现
|
||||||
|
- 打包结构修正:manifest.json 直接位于压缩包根目录,解压后选中同名文件夹即可加载(此前需进内层文件夹,Windows 用户按直觉选外层会报「清单文件缺失或不可读取」)
|
||||||
|
|
||||||
|
### 1.8.3
|
||||||
|
- **评论去重:评过的笔记不再重复评论**。每次成功评论后把笔记 ID 写入「已评论索引」(本机保存,最多 5000 条),之后任何时候再刷到同一篇(同关键词、不同关键词、换个时间重新跑都一样)都会**自动跳过**,不会给同一篇笔记发第二条评论——避免重复评论触发平台风控限流
|
||||||
|
- 运行时进度条新增「**已跳过已评论**」一栏,实时显示本轮跳过了几篇;侧边栏评论记录统计新增「**已去重**」,显示累计跳过的笔记总数
|
||||||
|
- 即使不是从列表进入(比如直接打开某篇笔记页),评论前也会先查索引,已评过就直接跳过
|
||||||
|
|
||||||
### 1.8.2
|
### 1.8.2
|
||||||
- **未授权时显示机器码**:卡密输入框下方常驻展示本机机器码 + 一键复制,去商城购买或手动激活时直接粘贴,不用再翻文档问客服怎么找
|
- **未授权时显示机器码**:卡密输入框下方常驻展示本机机器码 + 一键复制,去商城购买或手动激活时直接粘贴,不用再翻文档问客服怎么找
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ const DEFAULT_AI = {
|
|||||||
const AUTH_BASE = 'https://auth.88531.cn';
|
const AUTH_BASE = 'https://auth.88531.cn';
|
||||||
const AUTH_PROJECT_ID = 3;
|
const AUTH_PROJECT_ID = 3;
|
||||||
const AUTH_API_KEY = 'ak_bbf83b76df8219388d7f60b9e67c7db2';
|
const AUTH_API_KEY = 'ak_bbf83b76df8219388d7f60b9e67c7db2';
|
||||||
const CLIENT_VERSION = '1.8.2';
|
const CLIENT_VERSION = '1.8.5';
|
||||||
const TRIAL_MS = 72 * 60 * 60 * 1000; // 试用 72 小时(3 天)
|
const TRIAL_MS = 72 * 60 * 60 * 1000; // 试用 72 小时(3 天)
|
||||||
const TRIAL_QUOTA = 100; // 试用期最多 100 条评论(时间/条数先到先停,防止白嫖薅量)
|
const TRIAL_QUOTA = 100; // 试用期最多 100 条评论(时间/条数先到先停,防止白嫖薅量)
|
||||||
const GRACE_DAILY = 3; // 试用到期不硬锁:每天保留 3 条体验额度
|
const GRACE_DAILY = 3; // 试用到期不硬锁:每天保留 3 条体验额度
|
||||||
|
|||||||
@@ -254,3 +254,67 @@ h2 {
|
|||||||
color: #ff2442;
|
color: #ff2442;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 支付成功卡密展示区:无论自动激活成功与否都显示,用户可随时复制 */
|
||||||
|
.card-box {
|
||||||
|
margin-top: 14px;
|
||||||
|
border: 2px dashed #ff2442;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 14px;
|
||||||
|
background: #fff5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-label {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-key {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 240px;
|
||||||
|
font-family: Consolas, 'Courier New', monospace;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1a1a1a;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #f0c0c6;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
user-select: all;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-btn {
|
||||||
|
padding: 10px 18px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #ff2442;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-btn:hover {
|
||||||
|
background: #e01f3a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-hint {
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ok-line.warn {
|
||||||
|
color: #c62828;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
@@ -33,6 +33,14 @@
|
|||||||
<section id="order-panel" hidden>
|
<section id="order-panel" hidden>
|
||||||
<h2><span class="num">3</span> 订单状态</h2>
|
<h2><span class="num">3</span> 订单状态</h2>
|
||||||
<div id="order-status" class="order-status">等待创建订单…</div>
|
<div id="order-status" class="order-status">等待创建订单…</div>
|
||||||
|
<div id="card-box" class="card-box" hidden>
|
||||||
|
<div class="card-label">您的卡密(请保存好,可用于换机 / 手动激活)</div>
|
||||||
|
<div class="card-row">
|
||||||
|
<code id="card-key" class="card-key">…</code>
|
||||||
|
<button id="copy-card" class="copy-btn">复制卡密</button>
|
||||||
|
</div>
|
||||||
|
<div class="card-hint" id="card-hint"></div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -102,16 +102,11 @@ function startPolling() {
|
|||||||
try {
|
try {
|
||||||
const res = await chrome.runtime.sendMessage({ action: 'authQueryOrder', orderNo });
|
const res = await chrome.runtime.sendMessage({ action: 'authQueryOrder', orderNo });
|
||||||
if (!res || !res.ok) return;
|
if (!res || !res.ok) return;
|
||||||
if (res.activated) {
|
if (res.cardKey) {
|
||||||
|
// 只要服务端已发卡就把卡密显示出来——哪怕自动激活失败,用户也能自己复制激活
|
||||||
clearInterval(pollTimer);
|
clearInterval(pollTimer);
|
||||||
pollTimer = null;
|
pollTimer = null;
|
||||||
showActivated(res);
|
showCard(res);
|
||||||
} else if (res.cardKey && !res.activated) {
|
|
||||||
clearInterval(pollTimer);
|
|
||||||
pollTimer = null;
|
|
||||||
const status = $('order-status');
|
|
||||||
status.className = 'order-status error';
|
|
||||||
status.textContent = '✗ 已支付但激活失败:' + ((res.licenseState && res.licenseState.message) || '请把订单号发给客服手动处理');
|
|
||||||
} else {
|
} else {
|
||||||
const status = $('order-status');
|
const status = $('order-status');
|
||||||
status.className = 'order-status pending';
|
status.className = 'order-status pending';
|
||||||
@@ -123,16 +118,51 @@ function startPolling() {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showActivated(res) {
|
// 支付成功:显示卡密(激活成功/失败都显示,激活失败时给出手动激活指引)
|
||||||
|
function showCard(res) {
|
||||||
const status = $('order-status');
|
const status = $('order-status');
|
||||||
status.className = 'order-status success';
|
const ok = !!res.activated;
|
||||||
status.innerHTML = `
|
status.className = 'order-status ' + (ok ? 'success' : 'error');
|
||||||
<div class="ok-title">✓ 支付成功,已自动激活</div>
|
status.innerHTML = ok
|
||||||
<div class="ok-line">卡密:<b>${esc(res.cardKey || '')}</b></div>
|
? `<div class="ok-title">✓ 支付成功,已自动激活本机</div>
|
||||||
<div class="ok-line">到期时间:${esc(res.expireTime || '永久')}</div>
|
<div class="ok-line">到期时间:${esc(res.expireTime || '永久')}</div>
|
||||||
<div class="ok-line muted">回到插件侧边栏即可使用全部功能(本机已授权)。</div>`;
|
<div class="ok-line muted">回到插件侧边栏即可使用全部功能。</div>`
|
||||||
|
: `<div class="ok-title">✓ 支付成功</div>
|
||||||
|
<div class="ok-line warn">自动激活未生效${(res.licenseState && res.licenseState.message) ? ':' + esc(res.licenseState.message) : ''}</div>
|
||||||
|
<div class="ok-line muted">请复制下面的卡密,回到插件侧边栏「输入卡密」框粘贴 → 点「激活」即可。</div>`;
|
||||||
|
|
||||||
|
$('card-key').textContent = res.cardKey || '';
|
||||||
|
$('card-hint').textContent = ok
|
||||||
|
? '卡密已随本机自动激活,无需手动输入;保存好可换机或重装后使用。'
|
||||||
|
: '本页不会关闭也不会失效,卡密就在这里,随时可以复制。';
|
||||||
|
$('card-box').hidden = false;
|
||||||
|
$('card-box').scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 复制卡密(剪贴板 API 失败时降级 execCommand)
|
||||||
|
$('copy-card').addEventListener('click', async () => {
|
||||||
|
const key = ($('card-key').textContent || '').trim();
|
||||||
|
if (!key) return;
|
||||||
|
let ok = false;
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(key);
|
||||||
|
ok = true;
|
||||||
|
} catch (e) { /* 降级 */ }
|
||||||
|
if (!ok) {
|
||||||
|
try {
|
||||||
|
const ta = document.createElement('textarea');
|
||||||
|
ta.value = key;
|
||||||
|
ta.style.cssText = 'position:fixed;left:-9999px';
|
||||||
|
document.body.appendChild(ta);
|
||||||
|
ta.select();
|
||||||
|
ok = document.execCommand('copy');
|
||||||
|
ta.remove();
|
||||||
|
} catch (e) { ok = false; }
|
||||||
|
}
|
||||||
|
$('copy-card').textContent = ok ? '✓ 已复制' : '复制失败,请手动选中卡密复制';
|
||||||
|
setTimeout(() => { $('copy-card').textContent = '复制卡密'; }, 2500);
|
||||||
|
});
|
||||||
|
|
||||||
document.querySelectorAll('.pay-btn').forEach((btn) => {
|
document.querySelectorAll('.pay-btn').forEach((btn) => {
|
||||||
btn.addEventListener('click', () => createOrder(btn.dataset.pay));
|
btn.addEventListener('click', () => createOrder(btn.dataset.pay));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -203,10 +203,16 @@
|
|||||||
.xhs-progress-stats {
|
.xhs-progress-stats {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
justify-content: space-between !important;
|
justify-content: space-between !important;
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
gap: 4px 12px !important;
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
color: #ccc !important;
|
color: #ccc !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xhs-progress-stats span {
|
||||||
|
white-space: nowrap !important;
|
||||||
|
}
|
||||||
|
|
||||||
.xhs-progress-tip {
|
.xhs-progress-tip {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
font-size: 11px !important;
|
font-size: 11px !important;
|
||||||
|
|||||||
+100
@@ -381,6 +381,67 @@ class XHSNoteSaver {
|
|||||||
return urlMatch ? urlMatch[1] : window.location.href;
|
return urlMatch ? urlMatch[1] : window.location.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 从任意 URL 中提取笔记 ID(兼容 /explore/、/search_result/ 等路径)
|
||||||
|
extractNoteIdFromUrl(url) {
|
||||||
|
if (!url) return '';
|
||||||
|
try {
|
||||||
|
const m = String(url).match(/\/(?:explore|search_result|discovery\/item)\/([a-f0-9]{16,})/);
|
||||||
|
return m ? m[1] : '';
|
||||||
|
} catch (error) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从列表页的笔记元素上取笔记 ID(元素本身或其内部链接)
|
||||||
|
extractNoteIdFromElement(noteEl) {
|
||||||
|
if (!noteEl) return '';
|
||||||
|
try {
|
||||||
|
const ownHref = noteEl.getAttribute ? noteEl.getAttribute('href') : '';
|
||||||
|
const fromOwn = this.extractNoteIdFromUrl(ownHref || '');
|
||||||
|
if (fromOwn) return fromOwn;
|
||||||
|
const anchor = noteEl.querySelector
|
||||||
|
? noteEl.querySelector('a[href*="/explore/"], a[href*="/search_result/"]')
|
||||||
|
: null;
|
||||||
|
return anchor ? this.extractNoteIdFromUrl(anchor.getAttribute('href')) : '';
|
||||||
|
} catch (error) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 读取「已评论笔记」索引(跨会话持久,去重核心)
|
||||||
|
async loadCommentedNoteIds() {
|
||||||
|
if (this._commentedIds) return this._commentedIds;
|
||||||
|
try {
|
||||||
|
const result = await chrome.storage.local.get(['commentedNotes']);
|
||||||
|
const map = result.commentedNotes;
|
||||||
|
this._commentedIds = (map && typeof map === 'object') ? map : {};
|
||||||
|
} catch (error) {
|
||||||
|
console.error('读取已评论记录失败:', error);
|
||||||
|
this._commentedIds = {};
|
||||||
|
}
|
||||||
|
return this._commentedIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标记一条笔记为「已评论」(成功评论后调用)
|
||||||
|
async markNoteCommented(noteId) {
|
||||||
|
if (!noteId) return;
|
||||||
|
try {
|
||||||
|
const map = await this.loadCommentedNoteIds();
|
||||||
|
map[noteId] = Date.now();
|
||||||
|
// 控制体积:最多保留 5000 条,超出淘汰最旧的
|
||||||
|
const keys = Object.keys(map);
|
||||||
|
if (keys.length > 5000) {
|
||||||
|
keys.sort((a, b) => (map[a] || 0) - (map[b] || 0))
|
||||||
|
.slice(0, keys.length - 5000)
|
||||||
|
.forEach((k) => delete map[k]);
|
||||||
|
}
|
||||||
|
this._commentedIds = map;
|
||||||
|
await chrome.storage.local.set({ commentedNotes: map });
|
||||||
|
} catch (error) {
|
||||||
|
console.error('记录已评论笔记失败:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async checkIfSaved() {
|
async checkIfSaved() {
|
||||||
try {
|
try {
|
||||||
const result = await chrome.storage.local.get(['savedNotes']);
|
const result = await chrome.storage.local.get(['savedNotes']);
|
||||||
@@ -824,8 +885,12 @@ class XHSNoteSaver {
|
|||||||
let totalFound = 0;
|
let totalFound = 0;
|
||||||
let consecutiveFailures = 0; // 连续失败计数
|
let consecutiveFailures = 0; // 连续失败计数
|
||||||
const maxConsecutiveFailures = 5; // 最大连续失败次数
|
const maxConsecutiveFailures = 5; // 最大连续失败次数
|
||||||
|
this.skippedCommented = 0; // 本次运行中因「已评论过」跳过的数量
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// 预加载已评论索引:评过的笔记一律不再评(跨关键词、跨会话去重)
|
||||||
|
this.commentedIds = await this.loadCommentedNoteIds();
|
||||||
|
|
||||||
while (hasMoreNotes && this.isAutoClicking) {
|
while (hasMoreNotes && this.isAutoClicking) {
|
||||||
// 检查是否被停止
|
// 检查是否被停止
|
||||||
if (!this.isAutoClicking) {
|
if (!this.isAutoClicking) {
|
||||||
@@ -867,6 +932,19 @@ class XHSNoteSaver {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 已评论过的笔记直接跳过(去重核心:评过就不能再评)
|
||||||
|
const dedupId = this.extractNoteIdFromElement(note);
|
||||||
|
if (dedupId && this.commentedIds && this.commentedIds[dedupId]) {
|
||||||
|
note.dataset.clicked = 'true';
|
||||||
|
this.skippedCommented++;
|
||||||
|
if (this.skippedCommented === 1 || this.skippedCommented % 5 === 0) {
|
||||||
|
this.showToast(`已跳过 ${this.skippedCommented} 个已评论过的笔记`);
|
||||||
|
}
|
||||||
|
console.log(`该笔记已评论过,跳过: ${dedupId}(累计跳过 ${this.skippedCommented} 个)`);
|
||||||
|
this.updateProgress(totalClicked, totalFound);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 检查是否正在处理
|
// 检查是否正在处理
|
||||||
if (this.processingNotes.has(note)) {
|
if (this.processingNotes.has(note)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -1201,6 +1279,7 @@ class XHSNoteSaver {
|
|||||||
</div>
|
</div>
|
||||||
<div class="xhs-progress-stats">
|
<div class="xhs-progress-stats">
|
||||||
<span id="xhs-clicked-count">已点击: 0</span>
|
<span id="xhs-clicked-count">已点击: 0</span>
|
||||||
|
<span id="xhs-skipped-count">已跳过已评论: 0</span>
|
||||||
<span id="xhs-total-count">总计: 0</span>
|
<span id="xhs-total-count">总计: 0</span>
|
||||||
<span id="xhs-memory-usage">内存: --</span>
|
<span id="xhs-memory-usage">内存: --</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1418,10 +1497,12 @@ class XHSNoteSaver {
|
|||||||
updateProgress(clicked, total) {
|
updateProgress(clicked, total) {
|
||||||
const clickedElement = document.getElementById('xhs-clicked-count');
|
const clickedElement = document.getElementById('xhs-clicked-count');
|
||||||
const totalElement = document.getElementById('xhs-total-count');
|
const totalElement = document.getElementById('xhs-total-count');
|
||||||
|
const skippedElement = document.getElementById('xhs-skipped-count');
|
||||||
const fillElement = document.querySelector('.xhs-progress-fill');
|
const fillElement = document.querySelector('.xhs-progress-fill');
|
||||||
|
|
||||||
if (clickedElement) clickedElement.textContent = `已点击: ${clicked}`;
|
if (clickedElement) clickedElement.textContent = `已点击: ${clicked}`;
|
||||||
if (totalElement) totalElement.textContent = `总计: ${total}`;
|
if (totalElement) totalElement.textContent = `总计: ${total}`;
|
||||||
|
if (skippedElement) skippedElement.textContent = `已跳过已评论: ${this.skippedCommented || 0}`;
|
||||||
|
|
||||||
if (fillElement && total > 0) {
|
if (fillElement && total > 0) {
|
||||||
const percentage = Math.min((clicked / total) * 100, 100);
|
const percentage = Math.min((clicked / total) * 100, 100);
|
||||||
@@ -1567,6 +1648,19 @@ class XHSNoteSaver {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 去重兜底:当前笔记若已评论过,直接跳过(覆盖列表之外的入口,如手动打开)
|
||||||
|
try {
|
||||||
|
const currentNoteId = this.extractNoteId();
|
||||||
|
const idMap = await this.loadCommentedNoteIds();
|
||||||
|
if (currentNoteId && idMap && idMap[currentNoteId]) {
|
||||||
|
console.log('该笔记已评论过,跳过评论:', currentNoteId);
|
||||||
|
this.showToast('该笔记已评论过,自动跳过');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log('去重检查失败(不阻断):', error);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 1. 等待评论框出现
|
// 1. 等待评论框出现
|
||||||
await this.waitForCommentBox();
|
await this.waitForCommentBox();
|
||||||
@@ -1926,6 +2020,12 @@ class XHSNoteSaver {
|
|||||||
if (logs.length > 300) logs.length = 300; // 最多保留300条
|
if (logs.length > 300) logs.length = 300; // 最多保留300条
|
||||||
await chrome.storage.local.set({ commentLogs: logs });
|
await chrome.storage.local.set({ commentLogs: logs });
|
||||||
console.log('已记录评论:', record.title, record.comment);
|
console.log('已记录评论:', record.title, record.comment);
|
||||||
|
|
||||||
|
// 去重核心:把该笔记写入「已评论索引」,之后任何时候都不再重复评论
|
||||||
|
const commentedId = this.extractNoteIdFromUrl(url) || this.extractNoteId();
|
||||||
|
if (commentedId && !String(commentedId).startsWith('http')) {
|
||||||
|
await this.markNoteCommented(commentedId);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('记录评论失败:', error);
|
console.error('记录评论失败:', error);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "小红书自动评论助手",
|
"name": "小红书自动评论助手",
|
||||||
"version": "1.8.2",
|
"version": "1.8.5",
|
||||||
"description": "右侧侧边栏常驻的自动评论助手,支持试用/卡密授权、固定池/自定义文字/图片/AI评论",
|
"description": "右侧侧边栏常驻的自动评论助手,支持试用/卡密授权、固定池/自定义文字/图片/AI评论",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"storage",
|
"storage",
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>小红书自动评论助手 · 隐私政策</h1>
|
<h1>小红书自动评论助手 · 隐私政策</h1>
|
||||||
<div class="meta">生效日期:2026年10月10日 · 适用版本:v1.8.2 及以上</div>
|
<div class="meta">生效日期:2026年10月10日 · 适用版本:v1.8.5 及以上</div>
|
||||||
|
|
||||||
<p>感谢使用「小红书自动评论助手」浏览器扩展(以下简称"本插件")。我们重视你的隐私。本页面说明本插件收集哪些信息、如何使用以及如何保护。</p>
|
<p>感谢使用「小红书自动评论助手」浏览器扩展(以下简称"本插件")。我们重视你的隐私。本页面说明本插件收集哪些信息、如何使用以及如何保护。</p>
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,19 @@ body {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header h1 .ver-badge {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 4px;
|
||||||
|
padding: 1px 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: rgba(255, 255, 255, 0.28);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
vertical-align: middle;
|
||||||
|
letter-spacing: 0.3px;
|
||||||
|
}
|
||||||
|
|
||||||
.search-section {
|
.search-section {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
|
|||||||
+3
-2
@@ -9,7 +9,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1>🤖 小红书自动评论助手</h1>
|
<h1>🤖 小红书自动评论助手 <span class="ver-badge" id="ver-badge"></span></h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="auth-section">
|
<div class="auth-section">
|
||||||
@@ -171,6 +171,7 @@
|
|||||||
<span class="log-stat"><strong id="stat-today">0</strong> 今日</span>
|
<span class="log-stat"><strong id="stat-today">0</strong> 今日</span>
|
||||||
<span class="log-stat"><strong id="stat-month">0</strong> 本月</span>
|
<span class="log-stat"><strong id="stat-month">0</strong> 本月</span>
|
||||||
<span class="log-stat"><strong id="stat-total">0</strong> 总计</span>
|
<span class="log-stat"><strong id="stat-total">0</strong> 总计</span>
|
||||||
|
<span class="log-stat" title="已评论过的笔记会自动跳过,不再重复评论"><strong id="stat-dedup">0</strong> 已去重</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="log-list" class="log-list">
|
<div id="log-list" class="log-list">
|
||||||
<div class="log-empty">暂无评论记录,成功评论后会自动出现在这里</div>
|
<div class="log-empty">暂无评论记录,成功评论后会自动出现在这里</div>
|
||||||
@@ -203,7 +204,7 @@
|
|||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="version-info">
|
<div class="version-info">
|
||||||
<span>版本: 1.8.2</span>
|
<span id="footer-ver">版本: --</span>
|
||||||
<span>侧边栏常驻 · 专注于自动评论</span>
|
<span>侧边栏常驻 · 专注于自动评论</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+15
-1
@@ -994,8 +994,14 @@ class AutoCommentManager {
|
|||||||
// 从存储加载评论记录
|
// 从存储加载评论记录
|
||||||
async loadCommentLogs() {
|
async loadCommentLogs() {
|
||||||
try {
|
try {
|
||||||
const result = await chrome.storage.local.get(['commentLogs']);
|
const result = await chrome.storage.local.get(['commentLogs', 'commentedNotes']);
|
||||||
this.renderCommentLogs(result.commentLogs || []);
|
this.renderCommentLogs(result.commentLogs || []);
|
||||||
|
// 已去重统计:这些笔记之后都会自动跳过,不再重复评论
|
||||||
|
const dedupEl = document.getElementById('stat-dedup');
|
||||||
|
if (dedupEl) {
|
||||||
|
const map = result.commentedNotes;
|
||||||
|
dedupEl.textContent = (map && typeof map === 'object') ? Object.keys(map).length : 0;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载评论记录失败:', error);
|
console.error('加载评论记录失败:', error);
|
||||||
}
|
}
|
||||||
@@ -1288,5 +1294,13 @@ class AutoCommentManager {
|
|||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
// 标题旁徽章 + 页脚版本统一从 manifest 读取:升版只改 manifest 一处,不会再漏
|
||||||
|
try {
|
||||||
|
const v = chrome.runtime.getManifest().version;
|
||||||
|
const badge = document.getElementById('ver-badge');
|
||||||
|
if (badge) badge.textContent = 'v' + v;
|
||||||
|
const fv = document.getElementById('footer-ver');
|
||||||
|
if (fv) fv.textContent = '版本: ' + v;
|
||||||
|
} catch (e) { /* 版本显示失败不阻断初始化 */ }
|
||||||
new AutoCommentManager();
|
new AutoCommentManager();
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user