Consent Statement Popup With JavaScript – agreeToContent

Category: Javascript | March 27, 2018
Author:geetaristo
Views Total:380 views
Official Page:Go to website
Last Update:March 27, 2018
License:MIT

Preview:

Consent Statement Popup With JavaScript – agreeToContent

Description:

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="https://static1.squarespace.com/static/566913cb0e4c11de025472ae/t/57be9d0515d5db8e88288c2b/1515813659457/?format=1500w" ',
    ' 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="https://static1.squarespace.com/static/566913cb0e4c11de025472ae/t/5808fa4e1b631b83fe97fc20/1476983790330/Shell+Luttrell+Midwife+Cover?format=1000w"',
    '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 = 'https://promujer.org/'
}

You Might Be Interested In:


Leave a Reply