Skip to content

Commit ac3ee82

Browse files
committed
fix(js): fix renameVersionLinks.js
fix jquery selector
1 parent 3b17abd commit ac3ee82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rocm_docs/rocm_docs_theme/static/renameVersionLinks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function renameVersionLinks() {
2-
$('div.rst-other-versions dl:first-child a').each( function () {
2+
$('readthedocs-flyout dl.versions dd>a').each( function () {
33
const text = $(this).text();
44
const versionRegEx = /^.*((?:[0-9]+\.){2}[0-9]+).*$/g;
55
if (versionRegEx.test(text)) {
@@ -23,5 +23,5 @@ function waitForSelector(selector, callback, backoff=100, max=15) {
2323
}
2424

2525
$(document).ready(() => {
26-
waitForSelector('div.rst-versions', renameVersionLinks);
26+
waitForSelector('readthedocs-flyout dl.versions', renameVersionLinks);
2727
})

0 commit comments

Comments
 (0)