Skip to content

HiDeaUp/Open-Source-Disclaimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

1# Open-Source Adult Disclaimer

Need a disclaimer/notice to prevent offensive content? Well, you fount it! πŸ€—

This Adult Disclaimer is a vanilla JavaScript one (which means it doesn't depend from any libraries such as jQuery), and allows you to use it on any websites.

Super lightweight library (just ~4KB), delivered with an elegant, simple and responsive design (adjusts its size depending of the screen resolution).

Under the hood, it uses the client HTML5 browser's sessionStorage to remember the user consentement (agreed/disagreed to see the website).

Disclaimer Notice Gate, Premiew Screenshot

How to implement it?

Copy the assets folder into your project, and add the following in your HTML header (in <head></head> section).

<link rel="stylesheet" href="assets/css/disclaimer.css" />
<script src="assets/js/Disclaimer.js"></script>
<script src="assets/js/common.js"></script>

That's all! πŸ’ͺ Enjoy! 😍

How to change the text on the disclaimer?

Edit Disclaimer.js file, and change the values in the const strings = {} array located at the top of the file.

For instance, to update the headline from "Welcome!" to "Hi there...", change welcome: 'Welcome!' to welcome: 'Hi there...'

In the common.js file, you can change the disagreedRedirectLink URL where the visitor is redirected when disagreed to continue the visit on the site.

Troubleshooting

Any problems or suggestions, please just Open an Issue on GitHub 😊

Wanna build a dating webapp?

Have a look to pH7Builder, open source dating solution πŸš€