showRandomAnnouncement() — fastapi Function Reference
Architecture documentation for the showRandomAnnouncement() function in custom.js from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 415abf33_9daf_dfdc_6109_c2f3344872a5["showRandomAnnouncement()"] ccd902a6_8959_a158_664f_4800b10fc6b3["handleSponsorImages()"] ccd902a6_8959_a158_664f_4800b10fc6b3 -->|calls| 415abf33_9daf_dfdc_6109_c2f3344872a5 7bcfc807_293e_9fde_04cf_d1a772097850["main()"] 7bcfc807_293e_9fde_04cf_d1a772097850 -->|calls| 415abf33_9daf_dfdc_6109_c2f3344872a5 96bb8bea_1e0c_d064_4302_23cb3798fdd0["shuffle()"] 415abf33_9daf_dfdc_6109_c2f3344872a5 -->|calls| 96bb8bea_1e0c_d064_4302_23cb3798fdd0 style 415abf33_9daf_dfdc_6109_c2f3344872a5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
docs/en/docs/js/custom.js lines 127–142
async function showRandomAnnouncement(groupId, timeInterval) {
const announceFastAPI = document.getElementById(groupId);
if (announceFastAPI) {
let children = [].slice.call(announceFastAPI.children);
children = shuffle(children)
let index = 0
const announceRandom = () => {
children.forEach((el, i) => { el.style.display = "none" });
children[index].style.display = "block"
index = (index + 1) % children.length
}
announceRandom()
setInterval(announceRandom, timeInterval
)
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does showRandomAnnouncement() do?
showRandomAnnouncement() is a function in the fastapi codebase.
What does showRandomAnnouncement() call?
showRandomAnnouncement() calls 1 function(s): shuffle.
What calls showRandomAnnouncement()?
showRandomAnnouncement() is called by 2 function(s): handleSponsorImages, main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free