showRandomAnnouncement() — fastapi Function Reference
Architecture documentation for the showRandomAnnouncement() function in custom.js from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 10029d9b_fc07_27cd_ecbc_58b6581f93df["showRandomAnnouncement()"] 49961dba_6b4d_9e52_de16_4ef5b04a5bea["custom.js"] 10029d9b_fc07_27cd_ecbc_58b6581f93df -->|defined in| 49961dba_6b4d_9e52_de16_4ef5b04a5bea bc4b7342_8b2c_f549_6a06_c3481345114d["handleSponsorImages()"] bc4b7342_8b2c_f549_6a06_c3481345114d -->|calls| 10029d9b_fc07_27cd_ecbc_58b6581f93df 8d44dec4_66f2_396b_ce76_60bcbff6d1e8["main()"] 8d44dec4_66f2_396b_ce76_60bcbff6d1e8 -->|calls| 10029d9b_fc07_27cd_ecbc_58b6581f93df 7fe5a860_b558_ff48_72c2_88faa26a8f2b["shuffle()"] 10029d9b_fc07_27cd_ecbc_58b6581f93df -->|calls| 7fe5a860_b558_ff48_72c2_88faa26a8f2b style 10029d9b_fc07_27cd_ecbc_58b6581f93df 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
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does showRandomAnnouncement() do?
showRandomAnnouncement() is a function in the fastapi codebase, defined in docs/en/docs/js/custom.js.
Where is showRandomAnnouncement() defined?
showRandomAnnouncement() is defined in docs/en/docs/js/custom.js at line 127.
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