Skip to content

frostedREY/Simple-In-between-Blogpost-Content-Locker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple In-between Blogpost Content Locker

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.

Features

  • 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

Usage

  1. Add the HTML structure to your blogpost, and switch to "HTML View".
  2. Customize the password in checkPassword() function.
  3. Adjust maxAttempts and lockoutTime as needed.
  4. Place your protected content inside the #protected-content div.

Notes

  • 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

Preview — Incorrect Login Attempt

Export preview — Incorrect Login Shows Incorrect Login Attempt, modify number of attempts inside the code.

About

A lightweight JavaScript content locker for blogposts. Protects specific sections with a password, limits attempts, and enforces timed lockouts using cookies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages