3 Commits

Author SHA1 Message Date
jonny 944be49edb Support Memos v0.27 and improve API parsing
Bump supported Memos version to v0.27 across locales, README changelog, and manifest (version and version_name). Improve memos API compatibility: prefer and return trimmed username when present, handle non-numeric trailing name segments safely, and encode userid in the user-scoped memos URL to avoid issues with special characters.
2026-04-21 15:26:22 +08:00
jonny 25fbd486bf Bump extension version to 2026.04.11
Update manifest.json version from "2026.03.25" to "2026.04.11" to reflect the new release. No other changes to manifest fields or supported version range.
2026-04-11 10:44:40 +08:00
jonny 15d99cb51f Make editor container and input flex-aware
Enable flex layout for the editor wrapper and make .common-editor-inputer a flexible child. Added display:flex and flex-direction:column to the container rule, replaced height:auto with flex: 1 1 auto and added min-height:0 on .common-editor-inputer to allow proper shrinking/growth and avoid overflow issues in flex layouts. (css/main.css)
2026-04-11 10:43:47 +08:00
8 changed files with 20 additions and 9 deletions
+1
View File
@@ -5,6 +5,7 @@ Chrome 应用商店:<https://chrome.google.com/webstore/detail/memos-bber/cbhj
一个通过浏览器插件发布 [Memos](https://usememos.com/) 的插件。基于 iSpeak-bber 修改,原作者为 [DreamyTZK](https://www.antmoe.com/)。 一个通过浏览器插件发布 [Memos](https://usememos.com/) 的插件。基于 iSpeak-bber 修改,原作者为 [DreamyTZK](https://www.antmoe.com/)。
## 更新日志 ## 更新日志
- 20260421 更新匹配 0.27.x
- 20260325 优化语言按钮样式 - 20260325 优化语言按钮样式
- 20260323 优化中文显示效果 - 20260323 优化中文显示效果
- 20260322 适配移动端竖屏窗口 - 20260322 适配移动端竖屏窗口
+1 -1
View File
@@ -21,7 +21,7 @@
"message": "Save" "message": "Save"
}, },
"supportedMemosVersion": { "supportedMemosVersion": {
"message": "Compatible with Memos v0.15.0 - 0.26.x" "message": "Compatible with Memos v0.15.0 - 0.27.x"
}, },
"placeApiUrl":{ "placeApiUrl":{
"message": "Memos site URL" "message": "Memos site URL"
+1 -1
View File
@@ -21,7 +21,7 @@
"message": "保存" "message": "保存"
}, },
"supportedMemosVersion": { "supportedMemosVersion": {
"message": "Memos v0.15.0 - 0.26.x に対応" "message": "Memos v0.15.0 - 0.27.x に対応"
}, },
"placeApiUrl": { "placeApiUrl": {
"message": "Memos サイトURL" "message": "Memos サイトURL"
+1 -1
View File
@@ -21,7 +21,7 @@
"message": "저장" "message": "저장"
}, },
"supportedMemosVersion": { "supportedMemosVersion": {
"message": "Memos v0.15.0 - 0.26.x 호환" "message": "Memos v0.15.0 - 0.27.x 호환"
}, },
"placeApiUrl": { "placeApiUrl": {
"message": "Memos 사이트 URL" "message": "Memos 사이트 URL"
+1 -1
View File
@@ -21,7 +21,7 @@
"message": "保存" "message": "保存"
}, },
"supportedMemosVersion": { "supportedMemosVersion": {
"message": "兼容 Memos v0.15.0 - 0.26.x" "message": "兼容 Memos v0.15.0 - 0.27.x"
}, },
"placeApiUrl":{ "placeApiUrl":{
"message": "请填入 Memos 主页网址" "message": "请填入 Memos 主页网址"
+4 -1
View File
@@ -52,6 +52,8 @@ a{color: #555;}
overflow: visible; overflow: visible;
box-sizing: border-box; box-sizing: border-box;
contain: layout; contain: layout;
display: flex;
flex-direction: column;
} }
.memo-editor-header{ .memo-editor-header{
@@ -150,7 +152,8 @@ a{color: #555;}
.common-editor-inputer{ .common-editor-inputer{
padding-right: 1.5rem; padding-right: 1.5rem;
height: auto; flex: 1 1 auto;
min-height: 0;
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
} }
+9 -2
View File
@@ -11,12 +11,19 @@
return Number(user.id) return Number(user.id)
} }
if (typeof user.username === 'string' && user.username.trim() !== '') {
return user.username.trim()
}
const name = user.name || (user.user && user.user.name) const name = user.name || (user.user && user.user.name)
if (typeof name === 'string') { if (typeof name === 'string') {
const m = name.match(/\busers\/(\d+)\b/) const m = name.match(/\busers\/(\d+)\b/)
if (m) return Number(m[1]) if (m) return Number(m[1])
const last = name.split('/').pop() const last = name.split('/').pop()
if (last && !Number.isNaN(Number(last))) return Number(last) if (last) {
if (!Number.isNaN(Number(last))) return Number(last)
if (last.trim() !== '') return last.trim()
}
} }
return null return null
@@ -88,7 +95,7 @@
// the full set (including private), which affects tag extraction. // the full set (including private), which affects tag extraction.
// Newer versions may not expose the user-scoped endpoint, so we fallback by 404/405. // Newer versions may not expose the user-scoped endpoint, so we fallback by 404/405.
const urlUserScoped = info.userid const urlUserScoped = info.userid
? info.apiUrl + 'api/v1/users/' + info.userid + '/memos' + qs ? info.apiUrl + 'api/v1/users/' + encodeURIComponent(String(info.userid)) + '/memos' + qs
: null : null
const urlGlobal = info.apiUrl + 'api/v1/memos' + qs const urlGlobal = info.apiUrl + 'api/v1/memos' + qs
+2 -2
View File
@@ -2,8 +2,8 @@
"manifest_version": 3, "manifest_version": 3,
"name": "__MSG_extName__", "name": "__MSG_extName__",
"default_locale": "en", "default_locale": "en",
"version": "2026.03.25", "version": "2026.04.21",
"version_name": "Supports 0.15.0 - 0.26.x", "version_name": "Supports 0.15.0 - 0.27.x",
"action": { "action": {
"default_popup": "popup.html", "default_popup": "popup.html",
"default_icon": "assets/logo_24x24.png", "default_icon": "assets/logo_24x24.png",