Every movie card in both the Latest Releases and Recommended For You rows contains aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Vipul-Gejage/Disney-Hotstar-Clone/llms.txt
Use this file to discover all available pages before exploring further.
.watchlist-btn button with an onclick="showFullscreenAlert()" inline handler. Clicking the button dynamically creates a fullscreen overlay element, appends it to document.body, and fades it in. The overlay displays a confirmation message — Added Successfully! — along with a Close button that triggers the complementary closeFullscreenAlert() function, which fades the overlay out and removes it from the DOM.
The Add to watchlist Button
In Hotstar.html, every watchlist button is written as:
.watchlist-btn::before pseudo-element renders an add.png icon to the left of the button label using a background image scaled to 40% of a 35px square:
How showFullscreenAlert() Works
showFullscreenAlert() builds the overlay entirely in JavaScript using createElement and innerHTML, then attaches it to document.body. A setTimeout of 10ms sets opacity: 1 on the newly appended element, which triggers the CSS transition: opacity 0.3s for a smooth fade-in.
The overlay <div> is created with id="fullscreen-alert". Its inner HTML contains a .alert-content wrapper holding:
- An
<h2>— Added Successfully! - A
<p>— The show has been added to your watchlist. - A
<button>withonclick="closeFullscreenAlert()"— Close
How closeFullscreenAlert() Works
closeFullscreenAlert() retrieves the overlay by its id (fullscreen-alert) and sets opacity back to 0. The same CSS transition handles the fade-out. After 300ms — enough time for the 0.3s transition to finish — a setTimeout calls overlay.remove() to fully detach the element from the DOM.
JavaScript Source
CSS
The overlay starts atopacity: 0 and transitions to opaque on demand. It is position: fixed and covers the full viewport. The .alert-content card is centered using flex on the parent and styled with the same dark background color (#0c111b) used throughout the page:
The watchlist is purely visual — no data is stored anywhere. Clicking Add to watchlist only triggers the confirmation overlay; nothing is saved to memory,
localStorage, or a server. Refreshing the page resets the UI entirely with no record of previously added titles.Extending with localStorage
To persist watchlist selections across page refreshes, you can read and write a JSON array from localStorage inside showFullscreenAlert():
Hotstar.html to pass the title: