MCPcopy
hub / github.com/iChochy/NCE / updateSpeedButton

Method updateSpeedButton

js/ReadingSystem.js:664–669  ·  view source on GitHub ↗

* 更新倍速按钮显示

()

Source from the content-addressed store, hash-verified

662 * 更新倍速按钮显示
663 */
664 updateSpeedButton() {
665 if (!this.dom.speedText || !this.dom.speedBtn) return;
666
667 setText(this.dom.speedText, `${this.state.playbackRate}x`);
668 toggleClass(this.dom.speedBtn, 'active', this.state.playbackRate !== 1.0);
669 }
670
671 /**
672 * 加载播放进度

Callers 2

cyclePlaybackSpeedMethod · 0.95
loadSavedSpeedMethod · 0.95

Calls 2

setTextFunction · 0.90
toggleClassFunction · 0.90

Tested by

no test coverage detected