Skip to content

Commit

Permalink
Hide engine nodes when not using Lc0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakorr committed Apr 14, 2024
1 parent 7b51d36 commit ecb6b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion assets/js/acas-backend-gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const increaseInstanceSizeBtn = document.querySelector('#increase-instance-size-
const chessVariantDropdown = document.querySelector('#chess-variant-dropdown');
const engineEloInput = document.querySelector('#engine-elo-input');
const lc0WeightDropdown = document.querySelector('#lc0-weight-dropdown');
const engineNodesInput = document.querySelector('#engine-nodes-input');

if(userscriptInfoElem && typeof USERSCRIPT === 'object' && USERSCRIPT?.GM_info) {
const GM_info = USERSCRIPT?.GM_info;
Expand Down Expand Up @@ -272,12 +273,14 @@ function makeSettingChanges(inputElem) {
if(value === 'lc0') {
chessVariantDropdown.classList.add('hidden');
engineEloInput.classList.add('hidden');


engineNodesInput.classList.remove('hidden');
lc0WeightDropdown.classList.remove('hidden');
} else {
chessVariantDropdown.classList.remove('hidden');
engineEloInput.classList.remove('hidden');

engineNodesInput.classList.add('hidden');
lc0WeightDropdown.classList.add('hidden');
}
break;
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<div class="dropdown-item" data-value="maia-1900.pb">1900 elo (Maia)</div>
</div>
</div></div>
<div id="engine-nodes-input" class="textfield-input custom-input"><div><div class="input-title">Search Nodes</div>
<div id="engine-nodes-input" class="hidden textfield-input custom-input"><div><div class="input-title">Search Nodes</div>
<div class="input-subtitle">More nodes means more thinking of the move by the engine</div></div>
<input type="textfield" data-key="engineNodes" data-default-value="1" data-between="1-99999999">
</div>
Expand Down

0 comments on commit ecb6b9f

Please sign in to comment.