Refactor: use better function
parent
1d8671c5c7
commit
ecc354bc0d
|
@ -71,14 +71,13 @@ function fillInWord2() {
|
||||||
cancelHighlighting();
|
cancelHighlighting();
|
||||||
}
|
}
|
||||||
|
|
||||||
function ChangeHighlight() {
|
function toggleHighlighting() {
|
||||||
if (isHighlight) {
|
if (isHighlight) {
|
||||||
isHighlight = false;
|
isHighlight = false;
|
||||||
cancelHighlighting();
|
cancelHighlighting();
|
||||||
} else {
|
} else {
|
||||||
isHighlight = true;
|
isHighlight = true;
|
||||||
highLight();
|
highLight();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<p><b>阅读文章并回答问题</b></p>
|
<p><b>阅读文章并回答问题</b></p>
|
||||||
<div id="text-content">{{ today_article|safe }}</div>
|
<div id="text-content">{{ today_article|safe }}</div>
|
||||||
|
|
||||||
<input type="checkbox" onclick="ChangeHighlight()" checked/>生词高亮
|
<input type="checkbox" onclick="toggleHighlighting()" checked/>生词高亮
|
||||||
<input type="checkbox" onclick="onReadClick()" checked/>大声朗读
|
<input type="checkbox" onclick="onReadClick()" checked/>大声朗读
|
||||||
<input type="checkbox" onclick="onChooseClick()" checked/>划词入库
|
<input type="checkbox" onclick="onChooseClick()" checked/>划词入库
|
||||||
<div class="range">
|
<div class="range">
|
||||||
|
|
Loading…
Reference in New Issue