ב"ה
Home & Minyanim Widget
Fetches the current date and time, requests Jewish time data from the Hebcal API, and checks if it is before 8:00 PM local time. If it is before 8:00 PM, it adds one day to the halachic date (to display tonights count). If it is 8:00 PM or later, it uses the current date without change.
It then fetches the current Omer count for the halachic date from another Hebcal API and updates the webpage to display the Omer count along with a message to "Repeat Shema" after the current day of the week and the time of tzeit 85° (nightfall) for that date, formatted as a 12-hour clock with AM/PM notation.
The link within the widget opens the "Count Omer" page in a new tab.
After 8:00 PM it uses the current date's nightfall (tzeit) time, before 8:00 PM it uses tomorrow's (fix).
Main Widget
Fetches the current date and time. It then sends a request to the Hebcal API to fetch Zmanim data, including sunset and dawn times, based on the provided location. Next, it determines whether to display the blessings, i.e., only if they are after sunset and before dawn. It fetches the Omer count for the current date from the Hebcal API and updates the widget, displaying the count in both Hebrew and English.