Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Oct 6, 2022
1 parent 5cc5f1b commit 85f4fc7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 7 additions & 4 deletions doc/install/installers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ interpreter.
platform = "windows";
}
if (navigator.userAgent.indexOf("Mac") !== -1) {
platform = "macos";
// there's no good way to distinguish intel vs M1 in javascript so we
// just default to showing the first of the 2 macOS tabs
platform = "macos-intel";
}
$(document).ready(function(){
let all_tab_nodes = document.querySelectorAll(
Expand All @@ -144,9 +146,10 @@ interpreter.
child => child.nodeName === "INPUT");
let tab_label_nodes = [...document.querySelectorAll('.sd-tab-label')];
let correct_label = tab_label_nodes.filter(
label => label.textContent.trim().toLowerCase() === platform)[0];
let hash = correct_label.getAttribute('for');
let correct_input = input_nodes.filter(node => node.id === hash)[0];
// label.id is drawn from :name: property in the rST
label => label.id === platform)[0];
let input_id = correct_label.getAttribute('for');
let correct_input = input_nodes.filter(node => node.id === input_id)[0];
correct_input.checked = true;
});
</script>
7 changes: 4 additions & 3 deletions doc/install/manual_install_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ conda to ``/home/user/anaconda3``):
child => child.nodeName === "INPUT");
let tab_label_nodes = [...document.querySelectorAll('.sd-tab-label')];
let correct_label = tab_label_nodes.filter(
label => label.textContent.trim().toLowerCase() === platform)[0];
let hash = correct_label.getAttribute('for');
let correct_input = input_nodes.filter(node => node.id === hash)[0];
// label.id is drawn from :name: property in the rST
label => label.id === platform)[0];
let input_id = correct_label.getAttribute('for');
let correct_input = input_nodes.filter(node => node.id === input_id)[0];
correct_input.checked = true;
});
</script>

0 comments on commit 85f4fc7

Please sign in to comment.