From 68db5c486c9d42e201c31cccf9201a6fe53ba890 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Tue, 26 Sep 2023 17:23:02 +0200 Subject: [PATCH] doc: fix swagger display 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 --- doc/.sphinx/_static/github_issue_links.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/.sphinx/_static/github_issue_links.js b/doc/.sphinx/_static/github_issue_links.js index 980609cd03bb..f0706038b77a 100644 --- a/doc/.sphinx/_static/github_issue_links.js +++ b/doc/.sphinx/_static/github_issue_links.js @@ -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");