Consent Statement Popup With JavaScript – agreeToContent

Category: Javascript | March 27, 2018
Views Total:438 views
Official Page:Go to website
Last Update:March 27, 2018


Consent Statement Popup With JavaScript – agreeToContent


The agreeToContent.js library lets you create a cookie-enabled Consent Statement Popup that enables the user to access your web content after accepting your statement (typically used in adult web pages).

How to use it:

Include the JavaScript file ‘agreeToContent.js’ on the page.

<script src="agreeToContent.js"></script>

The default warning messages.

agreementMessage = [
    '<img src="" ',
    ' style="width:90%;max-width:160px"/><br /> <br />',
    '<span style="font-family: proxima-novai, \'Arial\', sans-serif;font-weight: 700; letter-spacing: 4.02px;line-height: 2.47em;"> ',
    'EPISTLE &amp; EPIPHANY </span><br />',
    '<p style="font-family: \'raleway\', \'Arial\', sans-serif; font-size: 18px;font-weight: 400;font-style: normal;letter-spacing: 0px;line-height: .9em;">',
    'An intimate collection <br /> ',
    'of birth poems,<br />',
    'love letters &amp; photographs',
    '</p><br />',
    '<img src=""',
    'style="width:90%; max-width:400px"/>',
    '<br /><br />',
    '<strong style="color:red;font-size:1.2em;">WARNING!</strong>',
    '<br /><br />',
    'This site contains uncensored photos of human child birth.',
    '<br /><br />',
    'Would you like to continue?<br /><br />',
    '<span style="color:grey;font-size:0.8em;">By clicking yes, you also agree to this site\'s use of cookies.</span>'

Set the redirect URL as you click on the ‘No’ button.

function continueNo() {
  document.cookie = 'agreed=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'
  window.location = ''

You Might Be Interested In:

Leave a Reply