Skip to content

Commit

Permalink
doc: fix swagger display
Browse files Browse the repository at this point in the history
The JavaScript we include to display the feedback button uses
the window.onload function. Swagger uses the same function ...
which means it's overwritten.

Fix the script we control (`github_issue_links.js`) to preserve
an existing onload function.

Fixes #12318

Signed-off-by: Ruth Fuchss <[email protected]>
  • Loading branch information
ru-fu committed Sep 26, 2023
1 parent 188c290 commit 68db5c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/.sphinx/_static/github_issue_links.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// if we already have an onload function, save that one
var prev_handler = window.onload;

window.onload = function() {
// call the previous onload function
if (prev_handler) {
prev_handler();
}

const link = document.createElement("a");
link.classList.add("muted-link");
link.classList.add("github-issue-link");
Expand Down

0 comments on commit 68db5c4

Please sign in to comment.