Transform your browser with daily verses from the Bhagavad Gita, Puranas, and Vedas. One sacred verse per session β appearing gently, then fading away.
Divine Wisdom is a lightweight Chrome extension that displays one sacred Hindu scripture verse per browser session. After a natural 5β7 second delay, a beautifully styled overlay slides down from the top of your screen β then quietly fades after 10β20 seconds. No interruptions. No clutter. Just one moment of ancient wisdom per day.
Verses are drawn from the Bhagavad Gita, Puranas, and Vedas, delivered in a premium saffron-and-gold aesthetic designed to feel sacred and calm.
- You start or restart your browser
- The extension sets a session flag β one message is queued
- On the first page you visit, after a 5β7 second natural delay, the verse overlay slides in from the top
- The verse displays for 10β20 seconds, then gently fades out
- No more overlays appear until the next browser restart
This one-per-session design is intentional β preserving your focus while still delivering a mindful moment.
divine-wisdom/
βββ manifest.json # Chrome Extension manifest (v3)
βββ background.js # Service worker β session gate & message logic
βββ content.js # Overlay injection & timing logic
βββ popup.html # Extension popup UI
βββ styles.css # Overlay styles (Cinzel + Poppins fonts, saffron theme)
βββ messages.json # Scripture verses database (5000+ entries)
βββ logo_gen.html # Animated logo generator (Canvas-based Om symbol)
βββ icon16.png # Toolbar icon (16x16)
βββ icon48.png # Extensions page icon (48x48)
βββ icon128.png # Chrome Web Store icon (128x128)
βββ README.md # This file
The extension runs on Manifest v3 using a service worker (background.js) instead of a persistent background page. This is the modern Chrome standard and keeps the extension lightweight and efficient.
The background script uses a dual-lock system to guarantee only one verse is ever shown per session β even when multiple tabs open simultaneously:
Browser Starts
β
βΌ
sessionGateLocked = false
showMessage = true (session storage)
β
βΌ
First tab sends getMessage
β
ββ Lock already set? β return null (no overlay)
β
ββ Not locked β Lock immediately + clear flag β fetch verse β send to tab
- In-memory lock (
sessionGateLocked) β blocks concurrent requests in the same service worker instance - Session storage flag (
showMessage) β persists across service worker restarts within the same session
Page loads
β
βββ Random delay: 5000β7000ms
β
βββ Request verse from background
β
βββ Slide in (0.8s cubic-bezier spring)
β
βββ Random duration: 10000β20000ms
β
βββ Fade out + remove from DOM
| Permission | Used In | Purpose |
|---|---|---|
storage |
background.js |
Session storage for the one-per-session gate flag |
tabs |
manifest.json |
Required to access tab context for content script injection |
activeTab |
manifest.json |
Enables the popup when the extension icon is clicked |
No browsing data is read, recorded, or transmitted. The extension only writes and reads its own session flag.
- Cinzel (serif) β Used for scripture source labels and speaker names. Evokes classical sacred typography.
- Poppins (sans-serif) β Used for verse body text. Clean and readable.
- Outfit (sans-serif) β Used in the popup UI for a modern, airy feel.
| Name | Hex | Used For |
|---|---|---|
| Saffron | #ff9933 |
Overlay border, source label, accent |
| Gold | #d4af37 |
Speaker name highlight |
| Deep Amber | #4a2c00 |
Body text on overlay |
| Warm White | #fffbf5 |
Popup background |
| Accent Orange | #e67e22 |
Popup headings and UI accents |
- Slides in from top of screen (off-screen start β
top: 0) - Spring easing:
cubic-bezier(0.175, 0.885, 0.32, 1.275) z-index: 2147483647β always on toppointer-events: noneβ never blocks your clicks- Subtle Om watermark in the bottom-right corner
- Visit the Chrome Web Store listing (link coming soon)
- Click Add to Chrome
- Confirm the permissions
- Restart your browser and open any page β your first verse will appear
- Clone or download this repository
git clone https://github.com/yourusername/divine-wisdom-extension.git
- Open Chrome and go to
chrome://extensions/ - Enable Developer Mode (toggle, top-right)
- Click Load unpacked and select the project folder
- Restart Chrome and open any webpage to trigger your first verse
Because the extension shows only once per session, use this workflow during development:
- Make your changes
- Go to
chrome://extensions/and click the refresh icon on the extension card - This re-triggers
onInstalled, which resets the session gate - Open any tab β the overlay will appear after 5β7 seconds
Verses are stored in messages.json as an array. Each entry follows this structure:
[
{
"source": "Bhagavad Gita",
"chapter": "Chapter 2, Verse 47",
"speaker": "Lord Krishna",
"message": "You have a right to perform your prescribed duties, but you are not entitled to the fruits of your actions."
}
]| Field | Description |
|---|---|
source |
Scripture name β displayed in uppercase saffron text |
chapter |
Chapter and verse reference β displayed as a subtitle |
speaker |
Who speaks the verse β displayed in gold |
message |
The verse text β displayed in italic |
logo_gen.html is a Canvas-based animated logo generator featuring:
- Radial saffron gradient background
- Animated Om symbol with pulsing glow effect
- Color cycling through gold β saffron β deep orange
- Gold outer ring border
Open it in Chrome, screenshot at the required sizes, and save as icon16.png, icon48.png, and icon128.png.
This extension collects zero personal data.
- No browsing history is accessed or stored
- No data is sent to any external server
- All storage is local and limited to the extension's own session flag
- Content scripts only display the overlay β no page content is read or transmitted
Full privacy policy: DivineWisdom Privacy Policy
- Bhagavad Gita β 700 verses of dialogue between Arjuna and Lord Krishna on duty, dharma, and liberation
- Vedas β The four foundational texts of Hindu philosophy: Rigveda, Samaveda, Yajurveda, Atharvaveda
- Puranas β 18 ancient texts covering cosmology, mythology, genealogy, and devotional teachings
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create your branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
If this extension brings peace to your day, consider supporting future projects:
π SUPPORT & HELP
"One who sees inaction in action, and action in inaction, is intelligent among men."
β Bhagavad Gita
Made with ποΈ and devotion