MCPcopy Create free account

hub / github.com/cutedCha/noteBoook / functions

Functions56 in github.com/cutedCha/noteBoook

↓ 18 callersFunctiondetectViewMode
* Helper function to simulate BookUI view mode detection * This mirrors the logic in BookUI.detectViewMode() * @param {number} width - Screen wi
tests/responsive.property.test.js:50
↓ 12 callersFunctioncheckTouchTargetSize
* Helper function to check if element meets minimum touch target size * @param {HTMLElement} element - DOM element to check * @returns {object}
tests/touch-target.property.test.js:82
↓ 9 callersFunctioncreateMockElement
* Helper function to create a mock element with specified styles * @param {string} selector - CSS selector/class name * @param {object} styles -
tests/touch-target.property.test.js:116
↓ 8 callersFunctionextractTextContent
* Helper function to extract text content from HTML * @param {string} html - HTML string * @returns {string} Plain text content
tests/pagination.property.test.js:67
↓ 8 callersFunctionfontFamilyMatchesType
* 检查字体家族是否匹配预期类型 * @param {string} fontFamily - 实际的字体家族值 * @param {string} expectedType - 预期的字体类型 ('serif' | 'sans' | 'mono') * @returns {boo
tests/font-consistency.property.test.js:94
↓ 8 callersFunctionnormalizeWhitespace
* Helper function to normalize whitespace for comparison * @param {string} text - Text to normalize * @returns {string} Normalized text (removes
tests/pagination.property.test.js:78
↓ 7 callersFunctiondot
(g, x, y)
js/demos/noise-demo.js:157
↓ 6 callersFunctioncreateBookState
* Helper function to create a fresh BookUI instance for testing * @param {number} currentPage - Current page number * @param {number} totalPages
tests/book.property.test.js:25
↓ 5 callersFunctionisValidFontFamily
* 检查字体家族是否是三种定义的字体之一 * @param {string} fontFamily - 字体家族值 * @returns {boolean}
tests/font-consistency.property.test.js:117
↓ 5 callersFunctionparseCSSValueToPixels
* Helper function to parse CSS value to pixels * @param {string} value - CSS value (e.g., '44px', '2.75rem') * @param {number} baseFontSize - Ba
tests/touch-target.property.test.js:47
↓ 5 callersFunctionshowTableOfContents
* 显示目录
js/app.js:1205
↓ 4 callersFunctiondot
(g, x, y)
js/demos/sea-demo.js:183
↓ 4 callersFunctiondot
(g, px, py)
js/demos/sword-demo.js:352
↓ 4 callersFunctiongetPixel
(px, py)
js/demos/magnify-demo.js:198
↓ 4 callersFunctiongetPixel
(px, py)
js/demos/minify-demo.js:206
↓ 4 callersFunctiongetPixel
(px, py)
js/demos/sea-demo.js:227
↓ 2 callersFunctiongetExpectedViewMode
* Helper function to determine expected view mode based on screen width * @param {number} width - Screen width in pixels * @returns {string} - E
tests/responsive.property.test.js:29
↓ 2 callersFunctiongetPos
(e)
js/demos/magnify-demo.js:251
↓ 2 callersFunctiongetPos
(e)
js/demos/minify-demo.js:259
↓ 2 callersFunctionhideContinueReadingModal
* 隐藏继续阅读弹窗
js/app.js:1121
↓ 2 callersFunctionmeasureContentHeight
* Helper function to measure content height * @param {string} htmlContent - HTML content to measure * @returns {number} Height in pixels
tests/pagination.property.test.js:57
↓ 2 callersFunctionshowCover
* 显示封面
js/app.js:1184
↓ 1 callersFunctionanimate
()
js/demos/postprocess-demo.js:75
↓ 1 callersFunctionanimate
()
js/demos/mvp-demo.js:98
↓ 1 callersFunctionanimate
()
js/demos/quaternion-demo.js:93
↓ 1 callersFunctionanimate
()
js/demos/sword-demo.js:68
↓ 1 callersFunctionanimate
()
js/demos/depth-demo.js:69
↓ 1 callersFunctionbindContinueReadingEvents
* 绑定继续阅读弹窗事件 * Requirements: 7.2, 7.3
js/app.js:997
↓ 1 callersFunctionbindEvents
* 绑定事件监听器
js/app.js:972
↓ 1 callersFunctioncacheElements
* 缓存 DOM 元素
js/app.js:956
↓ 1 callersFunctioncheckAndShowContinueReading
* 检查是否有保存的阅读进度,并显示继续阅读提示 * Requirements: 7.2, 7.3
js/app.js:1041
↓ 1 callersFunctioncreatePageRenderer
* Create a PageRenderer instance for testing * This mirrors the PageRenderer from app.js
tests/content-rendering.property.test.js:41
↓ 1 callersFunctiongetChapterInfo
* 获取章节信息 * @param {number} chapterNumber - 章节编号 * @returns {Object|null} 章节信息对象
js/app.js:1077
↓ 1 callersFunctionhideLoading
* 隐藏加载动画 * 实现平滑的过渡效果从加载动画到内容 * Requirements: 8.5
js/app.js:1380
↓ 1 callersFunctionloop
()
js/demos/noise-demo.js:303
↓ 1 callersFunctionloop
()
js/demos/sea-demo.js:293
↓ 1 callersFunctionrenderTableOfContents
* 渲染目录内容
js/app.js:1234
↓ 1 callersFunctionsetCurrentView
* 设置当前视图状态 * @param {string} view - 视图名称
js/app.js:1453
↓ 1 callersFunctionshowContinueReadingModal
* 显示继续阅读弹窗 * Requirements: 7.2
js/app.js:1112
↓ 1 callersFunctionupdateContinueReadingModal
* 更新继续阅读弹窗中的章节信息 * @param {Object} chapter - 章节信息对象 * @param {number} pageNumber - 页码 * Requirements: 7.2
js/app.js:1097
FunctioncreateMockWindow
* Helper function to create a mock window object for testing * @param {number} width - Screen width in pixels * @returns {object} - Mock window-
tests/responsive.property.test.js:38
FunctiongetComputedStyleValue
* Helper function to get computed style value * @param {HTMLElement} element - DOM element * @param {string} property - CSS property name * @
tests/touch-target.property.test.js:73
FunctiongetCurrentView
* 获取当前视图状态 * @returns {string} 当前视图 ('cover' | 'toc' | 'chapter')
js/app.js:1445
FunctionhandleContinueReading
* 处理"继续阅读"按钮点击 * 跳转到上次阅读的位置 * Requirements: 7.3
js/app.js:1132
FunctionhandleEnterClick
* 处理封面"开始阅读"按钮点击
js/app.js:1013
FunctionhandleStartFromBeginning
* 处理"从头开始"按钮点击 * 关闭弹窗,显示封面 * Requirements: 7.2
js/app.js:1173
FunctionhandleTocCloseClick
* 处理目录"返回封面"按钮点击
js/app.js:1030
FunctioninitApp
* 初始化应用
js/app.js:934
FunctiononEnd
()
js/demos/magnify-demo.js:280
FunctiononEnd
()
js/demos/minify-demo.js:288
FunctiononMove
(e)
js/demos/magnify-demo.js:271
FunctiononMove
(e)
js/demos/minify-demo.js:279
FunctiononStart
(e)
js/demos/magnify-demo.js:261
FunctiononStart
(e)
js/demos/minify-demo.js:269
FunctionshowLoading
* 显示加载动画 * Requirements: 8.5
js/app.js:1421
FunctionupdateTocReadMarkers
* 更新目录中的已读标记 * 在目录已渲染后,根据最新的已读状态更新视觉反馈 * Requirements: 7.4
js/app.js:1348