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

Method bindTranslationToggle

js/ReadingSystem.js:1113–1122  ·  view source on GitHub ↗

* 绑定翻译切换事件

()

Source from the content-addressed store, hash-verified

1111 * 绑定翻译切换事件
1112 */
1113 bindTranslationToggle() {
1114 if (this.bindingFlags.translationToggle || !this.dom.toggleTranslationBtn) {
1115 return;
1116 }
1117 this.bindingFlags.translationToggle = true;
1118
1119 on(this.dom.toggleTranslationBtn, 'click', () => {
1120 this.toggleTranslationMode();
1121 });
1122 }
1123
1124 /**
1125 * 绑定窗口事件

Callers 1

bindAllEventsMethod · 0.95

Calls 2

toggleTranslationModeMethod · 0.95
onFunction · 0.90

Tested by

no test coverage detected