| 544 | |
| 545 | } |
| 546 | function findNext(isprev) { |
| 547 | var $searchs = document.querySelectorAll('.find_highlight') |
| 548 | if($searchs.length==0){ |
| 549 | find() |
| 550 | return |
| 551 | } |
| 552 | if (isprev) find_index--; |
| 553 | else { find_index++; } |
| 554 | if (find_index >= $searchs.length) find_index = 0; |
| 555 | if (find_index < 0) find_index = $searchs.length - 1; |
| 556 | $searchs[find_index].scrollIntoView({ behavior: 'smooth', block: "center" }) |
| 557 | if ($prev_find) $prev_find.style.color = '#ffb02e' |
| 558 | $prev_find = $searchs[find_index] |
| 559 | $prev_find.style.color = 'rgb(255, 95, 46)' |
| 560 | } |
| 561 | |
| 562 | window.onkeydown=function(e){ |
| 563 | if (e.keyCode == 27) {//esc |