mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Auto update
This commit is contained in:
parent
bdde6912b9
commit
72fc5fd8c7
1 changed files with 4 additions and 4 deletions
|
|
@ -237,7 +237,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const languageSelector = document.getElementById('language-selector');
|
||||
if (languageSelector) {
|
||||
// Automatically select the option matching the current file name
|
||||
const currentFile = window.location.pathname.split('/').pop() || 'manual.html';
|
||||
const currentFile = window.location.pathname.split('/').pop() || 'manual';
|
||||
const options = Array.from(languageSelector.options);
|
||||
const matchingOption = options.find(opt => opt.value === currentFile);
|
||||
if (matchingOption) {
|
||||
|
|
@ -256,7 +256,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
// Manual Section Selector functionality
|
||||
const manualSelector = document.getElementById('manual-selector');
|
||||
if (manualSelector) {
|
||||
const currentFile = window.location.pathname.split('/').pop() || 'manual.html';
|
||||
const currentFile = window.location.pathname.split('/').pop() || 'manual';
|
||||
const options = Array.from(manualSelector.options);
|
||||
const matchingOption = options.find(opt => opt.value === currentFile);
|
||||
|
||||
|
|
@ -266,8 +266,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
// Default to first option (CLI) if current file doesn't match specific sections
|
||||
// This handles cases like manual-it.html where we want "CLI" selected
|
||||
if (currentFile.includes('manual') && !currentFile.includes('daemon') && !currentFile.includes('log')) {
|
||||
const cliOption = options.find(opt => opt.value === 'manual.html');
|
||||
if (cliOption) manualSelector.value = 'manual.html';
|
||||
const cliOption = options.find(opt => opt.value === 'manual');
|
||||
if (cliOption) manualSelector.value = 'manual';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue