A lightweight JavaScript + CSS content locker for blogposts written in Google's Blogging Site, Blogger.com.
It allows you to protect specific sections or paragraphs with a password,
limit login attempts, and enforce a timed lockout using cookies.
- Password-protected content (front-end only)
- Attempt limit (default: 3 tries)
- Lockout timer (default: 10 seconds)
- Cookie-based session persistence
- Logout option
- Dark mode support
- Add the HTML structure to your blogpost, and switch to "HTML View".
- Customize the password in
checkPassword()function. - Adjust
maxAttemptsandlockoutTimeas needed. - Place your protected content inside the
#protected-contentdiv.
- This is a front-end only solution — not secure for sensitive data. DO NOT use this as a real password locker.
- Best used for casual gating (e.g., bonus tips, hidden paragraphs).
- Default password is set in the script: if (password === "A123@#").
- After 3 failed login attempts (default), the protected content/paragraph will remain hidden and the form will lock.
- After 10 seconds, the login interface will reappear automatically.
- Refreshing or revisiting the page does not reset the 10‑second lockout timer, since it is tracked via cookies.
##Screenshot
Shows Incorrect Login Attempt, modify number of attempts inside the code.