惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
S
Security Affairs
T
Tor Project blog
T
Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
A
Arctic Wolf
K
Kaspersky official blog
O
OpenAI News
Spread Privacy
Spread Privacy
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
量子位
博客园_首页
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
S
Schneier on Security
博客园 - 叶小钗
Attack and Defense Labs
Attack and Defense Labs
AI
AI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 【当耐特】
Jina AI
Jina AI
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
D
Darknet – Hacking Tools, Hacker News & Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
H
Hacker News: Front Page
The Last Watchdog
The Last Watchdog
V
V2EX
S
SegmentFault 最新的问题
V
Visual Studio Blog
PCI Perspectives
PCI Perspectives
Microsoft Security Blog
Microsoft Security Blog

遐说

2026第一场日出日落-黄山 [徒步]宁波九龙爱心线 [徒步]仙居公盂徒步+丽人谷溯溪(多图) 文献引用批量标注蓝色-Zotero/EndNote [出差]内蒙草原风光 [徒步]浙东小九寨 [徒步]西湖小猫线 微软Office365家庭版拼车5年180 2024浏阳跨年烟火 一路向北-广西 落日余晖——武汉东湖 博士论文盲审通过 青海出差 我开盒了我自己 hexo-butterfly+artalk无法显示文章PV浏览次数 记某站字体混淆解析方案 记第一次进藏 2024川西大环线 Python读取NetCDF文件-裁剪&计算 2024武汉东湖樱花园 zotero批量修改条目语言解决”等”和”et al”混排问题 torch_geometric_temporal安装报错找不到to_dense_adj 武汉冻雨&乡村春节 云南镇雄县凉水村滑坡:卫星影像解析 博客聚合平台RSS订阅-BlogFinder&博友圈&十年之约 腾讯云CDN正式取消免费10G流量包 2023跨年闲逛武汉 观感|小米SU7技术发布会 【留痕】解密微信聊天记录工具:年度报告、聊天导出一键搞定! 小米电脑管家 vs. MIUI+: 手机与PC协同体验大比拼! Waline私有化部署(Docker+VPS) rclone数据同步使用记录(OneDrive+COS+AList) 科研绘图工具 秋意渐浓 Docker buildx交叉编译Python记录 Word分章节图片公示编号方法 Lightroom+Google Map生成个人足迹 评论|如何看待面青地项目允许博士后变更依托单位 收到明信片啦! [Adobe]Your Adobe app is not genuine解决方案-Clash版 尝试配置PicGo-Core日志输出等级 巴东三峡巫峡长 摄影|东湖绿道 旅行|彩云之南 超实用的铁路地图网站 新冠首阳 树莓派netplan连接开放网络(无密码WIFI) 周末|流浪地球2|维也纳展映 维也纳黄昏&夜景 Sony A7M4/M3欧版解锁多国语言 GRASS斜坡单元分割插件(r.slopeunits) windows移植方案 周末|Prater公园|夜景 快乐五一|布拉格Praha 周末|Melk小镇一日游 CDN流量太贵?图床图片批量压缩替换 维也纳|生活感受|交通|物价|通货膨胀 GitHub Remark|给Gay Hub的小伙伴加备注 周末自制烤冷面-不想干活 布达佩斯|匈牙利游记(多图) Notion2Markdown联动发布Hexo博客-自动化部署方案 SPI/TWI水文参数计算公式-ArcGIS Pro 【再见】难得是欢聚, 最是离别多 拯救者R9000P氮化镓电源适配器测评 今天你的华为P30无限重启了吗? pyTranscriber字幕生成软件(带代理版本) Adobe Illustrator错误代码160解决方案 EndNote导入PDF文件关联(SCI-RIS-Helper)插件 ZED-F9PK4 RTK GNSS模块使用指南 pyeemd安装教程--win10 wsl + ubuntu 樱花草 - 小学回忆 咸九高速-幕阜山扶贫攻坚重点项目 NXP i.MX6ULL平台Nodejs & npm 安装教程 全国分省12.5米DEM数字高程数据(ALOS 12.5m)下载 2018&2010全国四级行政区划(省-市-区/县-街道/乡镇)c 全国/湖南省/浙江省水文监测站基本数据&湖北省水文观测站历史数据 天舟二号发射成功 解决方案:Grammarly for Word 无法使用 SDZM: Software for determining shear failure regions of rock joints CNKI知网油猴插件-一键导入Endnote&下载PDF RSS 订阅地大新闻 - CUG News Word 公式字体替代方案 ArcGIS License Manager 无法启动 - Sorry, this application cannot run under a virtual machine html table 批量转 Excel(xlsx) ImageColorAnalysisTool-图像颜色分析工具-Matlab GUI版 matlab柱状图(bar)转折线图(line)方案 图像主要颜色分析工具(pyImageColorAnalysisTool) 科研资料备份同步方案(FreeFileSync) 海量文献自定义格式整理方法(EndNote) CUG校外访问内网网站方法(官方VPN) 通过三个点绘制三维圆弧-python 记挖竹笋 日常实用小软件 长江流域三峡库区水情水位信息获取 EndNote导入文献期刊名-J无法识别解决方案 pymongo 使用记录 Redis学习记录 Laravel 5.6 学习记录 文件名批量提取工具介绍及使用教程 win7x64 下 redis 的安装 CI框架常用数据库操作技巧
Memos添加utterances评论区
Dorad · 2023-09-09 · via 遐说

发表于|更新于|博客工具

|总字数:751|阅读时长:3分钟|浏览量:|

目前 Memos 官方已支持评论功能,无需再另外配置!

¶更新日志

  • 2023.12.19: 更新适配v0.18.0

  • 2023.09.19: 更新适配v0.15.0

  • 2023.09.09: 初版版本,适配v0.14.4

由于 Twitter 改版,RSSHub无法抓取,以至于之前的瞬间都无法同步过来。

故前些天也整上了Memos,真香。今天折腾一下,给Memos添上评论。

先试了Waline,但略复杂,想和博客共用一套,发现不太行,遂转向utterances评论系统。

¶快速配置

  • GitHub新建一个新的公开仓库。

  • 打开Memos,进入设置→系统,配置自定义CSS自定义脚本,并保存。

配置页面

¶自定义脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const repo = "Doradx/comments";
const issueTerm = "pathname";
const theme = "github-light";

var commentsLoaded = false;
function addUtterances() {
if (document.querySelectorAll('script[label="utterances"]').length > 0) {
console.log("Remove Utterances.");
document
.querySelectorAll('script[label="utterances"]')
.forEach((e) => e.remove());
}
console.log("start to init utterances.");
var js = document.createElement("script");
js.src = "https://utteranc.es/client.js";
js.setAttribute("repo", repo);
js.setAttribute("issue-term", issueTerm);
js.setAttribute("theme", theme);
js.setAttribute("crossorigin", "anonymous");
js.setAttribute("async", true);
js.setAttribute("label", "utterances");
const main = document.querySelector("div.memo-content-wrapper").parentNode
.parentNode;
main.nextElementSibling.hidden = true;
if (main == null || main.childElementCount == 0) {
console.error("main is null");
return false;
}
main.appendChild(js);
return true;
}
var timer = setTimeout(checkMemosPage, 50);
function checkMemosPage() {
if (window.location.href.indexOf("/m/") > 0 && !commentsLoaded) {
console.log("Memos page loaded.");
if (addUtterances()) {
commentsLoaded = true;
console.log("Utterances added.");
} else {
console.error("Failed to add utterances.");
}
return;
}
if (
window.location.href.indexOf("/u/") > 0 ||
window.location.pathname === "/"
) {
addCommentBtn();
console.log("Personal page.");
return;
}
}
var observer = new MutationObserver(function (mutations) {
if (document.querySelectorAll("div.utterances").length > 0) {
return;
} else {
clearTimeout(timer);
timer = setTimeout(checkMemosPage, 100);
}
});
observer.observe(document.body, { childList: true, subtree: true });
function addCommentBtn() {
console.log("Start to add comment btn.");
var memosDivList = document.querySelectorAll("div.memo-wrapper");
if (memosDivList == null) {
return false;
}
console.log(memosDivList);
memosDivList.forEach((div) => {
if (
div.querySelector(".moments-comments-button") != null ||
div.children.length == 0
) {
return;
}
const memos_id = div.classList.item(2).split("-")[1];
var btn = document.createElement("div");
btn.className = "moments-comments-button";
btn.style = "align-self:end;padding-right:10px;padding-top:10px;";
btn.innerHTML = `<a href="/m/${memos_id}"target="_blank">评论💬</a>`;
div.appendChild(btn);
console.log("add btn for " + memos_id);
});
}

仅需将上述脚本的repo参数改为自己的公开仓库即可!

¶效果

评论区效果

¶参考

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 遐说

请喝果茶

  • Wechat

    Wechat

  • Alipay

    Alipay