Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* deferment.js - PUBLIC DOMAIN RELEASE - VERSION 1.0.0 - https://pastebin.com/5NfBvjMN */
- var Deferment = new function () {
- var FoundFalse = false;
- this.WasDeferred = function ( ) { return FoundFalse; }
- this.Initialize = function ( ) {
- var CookieErrorText = "This website requires cookies to be enabled.";
- if ( Private.CookieWorks ( CookieErrorText ) == false) { FoundFalse = true; }
- }
- var Private = {
- CookieWorks: function ( ErrorMsgIn ) {
- var Output = true;
- var CookieTest = "Cookie Test";
- var TestVal = "0123456789";
- Cookies.SetCookie ( CookieTest, TestVal, 365 );
- var CookieValue = Cookies.GetCookie ( CookieTest, '' );
- if ( CookieValue != TestVal ) {
- document.write( "<div class='deferment'><div><div><span class='deferment-message'></span></div></div></div><style>body {overflow: hidden;} .deferment .deferment-message:after {content:'" + ErrorMsgIn + "';}</style>" );
- Output = false;
- }
- return Output;
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement