feat: rtd integration config changes#544
Draft
SecondSkoll wants to merge 1 commit intocanonical:doc-domain-migrationfrom
Draft
feat: rtd integration config changes#544SecondSkoll wants to merge 1 commit intocanonical:doc-domain-migrationfrom
SecondSkoll wants to merge 1 commit intocanonical:doc-domain-migrationfrom
Conversation
morphis
reviewed
Jan 19, 2026
Collaborator
morphis
left a comment
There was a problem hiding this comment.
Thanks!
Left comments inline.
| @@ -0,0 +1,51 @@ | |||
| // overwrite links.js | |||
Collaborator
There was a problem hiding this comment.
What is this for? Not sure what magic this does but if it overwrites a links.js I would expect the file to be named links_overwrite.js to make things clear and explicit.
|
|
||
| // // 2. Call the original console.log to still output to the browser console | ||
| // console.stdlog.apply(console, arguments); | ||
| // }; |
Collaborator
There was a problem hiding this comment.
If this is no longer need, can we drop it to avoid shipping unused code/commented code?
| // console.log(`Waiting for element: ${element}...`) | ||
| if(document.querySelector(element)){ | ||
| clearInterval(foo); | ||
| // console.log(`Element found: ${element}.`) |
Collaborator
There was a problem hiding this comment.
Please drop commented code
| anchors.forEach(anchor => { | ||
| // console.log(`Checking URL for replacement: ${anchor.href}`); | ||
| anchor.href = anchor.href.replace(new RegExp(oldDomain, 'g'), newDomain); | ||
| // console.log(`URL now: ${anchor.href}`); |
| html_js_files = [ | ||
| "js/cookie-banner-bundle.js" | ||
| "js/cookie-banner-bundle.js", | ||
| "js/url_overwrite.js", |
| @@ -0,0 +1,51 @@ | |||
| // overwrite links.js | |||
Collaborator
There was a problem hiding this comment.
Needs a copyright header. What license is this code under?
| // Start observing the target node (rtd-flyout) | ||
| // execute the overwrite when the element is loaded | ||
| waitForElement("readthedocs-flyout", function(){ | ||
| // console.log(`Triggering URL rewrite`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation changes
Changes configuration to support serving docs on canonical.com/anbox-cloud/docs