Skip to content

Comments

feat: rtd integration config changes#544

Draft
SecondSkoll wants to merge 1 commit intocanonical:doc-domain-migrationfrom
SecondSkoll:main
Draft

feat: rtd integration config changes#544
SecondSkoll wants to merge 1 commit intocanonical:doc-domain-migrationfrom
SecondSkoll:main

Conversation

@SecondSkoll
Copy link

Documentation changes

Changes configuration to support serving docs on canonical.com/anbox-cloud/docs

@SecondSkoll SecondSkoll requested a review from a team as a code owner January 19, 2026 06:43
@SecondSkoll SecondSkoll marked this pull request as draft January 19, 2026 06:49
Copy link
Collaborator

@morphis morphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Left comments inline.

@@ -0,0 +1,51 @@
// overwrite links.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
// };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}.`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

html_js_files = [
"js/cookie-banner-bundle.js"
"js/cookie-banner-bundle.js",
"js/url_overwrite.js",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

@@ -0,0 +1,51 @@
// overwrite links.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants