mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 23:16:50 +00:00
gitbook 主题fix最近阅读
This commit is contained in:
@@ -30,4 +30,18 @@ function extractLangId(str) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { extractLangPrefix, extractLangId }
|
||||
/**
|
||||
* 列表中用过来区分page只需要端的id足够
|
||||
*/
|
||||
|
||||
function getShortId(uuid) {
|
||||
if (!uuid || uuid.indexOf('-') < 0) {
|
||||
return uuid
|
||||
}
|
||||
// 找到第一个 '-' 的位置
|
||||
const index = uuid.indexOf('-')
|
||||
// 截取从开始到第一个 '-' 之前的部分
|
||||
return uuid.substring(0, index)
|
||||
}
|
||||
|
||||
module.exports = { extractLangPrefix, extractLangId, getShortId }
|
||||
|
||||
Reference in New Issue
Block a user