Skip to content

build(deps): bump hexo-theme-butterfly from 5.5.4 to 5.6.0#3

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/hexo-theme-butterfly-5.6.0
Closed

build(deps): bump hexo-theme-butterfly from 5.5.4 to 5.6.0#3
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/hexo-theme-butterfly-5.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 16, 2026

Copy link
Copy Markdown
Contributor

Bumps hexo-theme-butterfly from 5.5.4 to 5.6.0.

Release notes

Sourced from hexo-theme-butterfly's releases.

5.6.0

Full Changelog: jerryc127/hexo-theme-butterfly@5.5.5...5.6.0

New Features

  • 新增 Knocket 聊天功能,新增對應的 pug 模板 knocket.pug,在聊天配置中新增 knocket 選項
  • 新增腳本和樣式表緩存機制(scriptCache / cssCache),避免重複加載相同資源
  • 新增 rafThrottle 工具函數,基於 requestAnimationFrame 實現節流
  • 新增 HTML 轉義函數(sanitizeString),防範 XSS 注入

Performance

  • TOC 滾動改用 IntersectionObserver 取代原本的 throttle + 遍歷方式,大幅減少滾動事件計算量
  • 滾動處理從 btf.throttle 改為 btf.rafThrottle,與瀏覽器渲染幀率同步
  • resize 事件處理加入 rafThrottle 節流
  • scrollToDest 平滑滾動改用 easeOutQuart 緩動曲線,取代原本的線性插值
  • rightsideScrollPercentgoUpElement / scrollPercentElement 改為閉包緩存,避免每次滾動都查詢 DOM
  • overflowPaddingRpage-header / menus 元素改為閉包緩存
  • 漢堡選單切換時 document.getElementById 查詢結果緩存到 sidebarFn
  • adjustMenuclassList.toggle 包裹在 requestAnimationFrame
  • forPostFn 改為接收 $article 參數,內部所有函數(addHighlightTooladdPhotoFigcaptionrunLightboxscrollFnToDoaddTableWrapclickFnOfTagHidetabsFn)統一使用傳入的 $article 查詢,避免重複 document.getElementById('article-container')
  • tabsFn 改為事件委託,將點擊監聽綁在 $article 上而非每個 .tabs 元素
  • clickFnOfTagHide 改為事件委託,綁在 $article 上而非逐個 .hide-button 綁定
  • getActualHeight 改用 cloneNode(true) + 隱藏插入測量,取代原本遍歷父節點修改 style 的方式
  • 簡繁轉換的查找從 indexOf 改為 Map.has / Map.get,O(1) 查找
  • 簡繁字對映改為延遲初始化(getMaps),避免不必要的計算
  • tw_cn.jstranslateButtonObject 改為 let,支持 pjax 後重新查詢
  • Mermaid 手勢系統重構:用 AbortController 管理事件監聽生命週期,避免重複綁定;wheel 事件加入 stopPropagation 防止穿透滾動;getBoundingClientRect 加入 dirty flag 緩存;DOM 更新改為 requestAnimationFrame 批次處理;deltaMode 正規化處理跨瀏覽器差異
  • Mermaid 圖片預覽 URL 的 revokeObjectURL 超時從 30 秒縮短為 5 秒
  • MathJax 改用 ui/lazy 模組實現延遲渲染,移除原本的 renderActions.findScript hack
  • MathJax 重新渲染改用 typesetClear + typesetPromise,取代 texReset
  • random_cover.jsresolvePostAsset 提取為獨立函數,減少重複邏輯
  • page.jsgetVersion 改為直接引用模組頂部 requirethemeVersion,避免每次呼叫都重複讀取 package.json
  • inject_head_js.js 的 darkmode 判斷邏輯修復了 start > end(跨午夜)的時段判斷錯誤

Bug Fixes

  • 修復 pjax 下簡繁轉換按鈕文字不會更新的問題(translateButtonObject 改為 let 並在 translateInitialization 中重新查詢)
  • 修復 pjax 完成時 script[data-pjax] 替換失敗的問題(加入 item.parentNode 存在性檢查)
  • 修復 pjax 錯誤處理中 responseURL 可能為 undefined 的問題,加入空值檢查
  • 修復 handleThemeChangethemeChange 可能不是物件的問題(加入 typeof fn !== 'function' 檢查)
  • 修復 scrollFncheckDocumentHeight() 在初始化時過早 return 導致滾動事件未綁定的問題
  • 修復 Mermaid 在 Chrome 上滾動時圖表亂跳的問題(svg.style.touchAction = 'none' + wheel 事件 preventDefault + stopPropagation
  • 修復 Mermaid 手勢在 themeChange/pjax 後重複綁定的問題(AbortController 清理 + __mermaidGestureBound 移除改用 __mermaidAbortController
  • 修復 Mermaid 配置解析失敗時無錯誤回報的問題(加入 try/catch)
  • 修復 gallery.jsIMAGE_REGEX 在多次呼叫時 lastIndex 未重置的 bug
  • 修復 flink.jsbutton.js 缺少 HTML escape 導致的 XSS 風險
  • 修復 hide.jsparseArgs 缺少 trim 導致參數帶有前導空格
  • 修復 series.js 模組級可變狀態 groups 在多次 build 時累積過期資料(加入 before_generate 清理)
  • 修復 score.js 重複實現 escapeHTML,改用 hexo-utilescapeHTML + 額外處理 {}
  • 修復 getArchiveLength.jsmonthly 模式下 year 計數未累加的問題(year 計數改為始終執行)
  • 修復 getArchiveLength.js 中 key 選取邏輯,daily 模式下也能正確取得月份計數

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [hexo-theme-butterfly](https://github.com/jerryc127/hexo-theme-butterfly) from 5.5.4 to 5.6.0.
- [Release notes](https://github.com/jerryc127/hexo-theme-butterfly/releases)
- [Commits](jerryc127/hexo-theme-butterfly@5.5.4...5.6.0)

---
updated-dependencies:
- dependency-name: hexo-theme-butterfly
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 16, 2026
@dependabot @github

dependabot Bot commented on behalf of github Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #4.

@dependabot dependabot Bot closed this Jul 21, 2026
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/hexo-theme-butterfly-5.6.0 branch July 21, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants