PageSourceSearch

https://westonerz.com/wp-content/plugins/easy-marijuana-age-verify/includes/assets/scripts.js?ver=1717829956

js westonerz.com collected 2026-09-28 14:44:57 UTC 4,369 bytes, 77 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3	// Check for global variable settings
4	let $body = $('body'),
5		$emavoverlay = $('#emav-overlay-wrap');
6
7	// Set tabindex for better one-tab ADA compliance
8	$('#emav_confirm_age').attr("tabindex", 1);
9	$('#emav_not_confirm_age').attr("tabindex", 1);
10	$('#emav_verify_remember').attr("tabindex", 1);
11
12	if ( emav_ajax_object !== undefined && Cookies.get('emav-age-verified') === undefined ) {
13		// Add ajax check option body class check, if exists
14		if ( $body.hasClass('emav-ajax-check') == true ) {
15		// set status
16		$.get( emav_ajax_object.ajax_url, { action: 'emav_get_status' })
17			.success( function(resp) {
18				let emavstatus = resp;
19				emav_eval_overlay_display(emavstatus);
20				});
21		} else {
22			if ( $body.hasClass('emav-disabled') == true ) emavstatus = 'disabled';
23			if ( $body.hasClass('emav-admin-only') == true ) emavstatus = 'admin-only';
24			if ( $body.hasClass('emav-guests') == true ) emavstatus = 'guests';
25			if ( $body.hasClass('emav-all') == true ) emavstatus = 'all';
26			emav_eval_overlay_display(emavstatus);
27		}
28	} else if ( $body.hasClass('emav-admin-only') == true ) { // If cookie set and in testing mode, still display popup
29		emavstatus = 'admin-only';
30		emav_eval_overlay_display(emavstatus);
31	}
32	function emav_eval_overlay_display(emavstatus) {
33		if ( $.inArray( emavstatus , [ 'all', 'guests', 'admin-only' ]) > -1 ){
34			if ( emavstatus === 'all' ) {
35				$body.css('position', 'fixed');
36				$body.css('width', '100%');
37				$emavoverlay.fadeIn();
38			}
39			else if ( $body.hasClass('logged-in') !== true && emavstatus === 'guests') {
40				$body.css('position', 'fixed');
41				$body.css('width', '100%');
42				$emavoverlay.fadeIn();
43			}
44			else if ( $body.hasClass('logged-in') == true && $body.hasClass('administrator') == true && emavstatus === 'admin-only') {
45				$body.css('position', 'fixed');
46				$body.css('width', '100%');
47				$emavoverlay.fadeIn();
48			}
49			else {
50				$emavoverlay.fadeOut();
51			}
52		}
53		$("#emav_confirm_age").on('click touch', function () {
54			// Setting cookie options
55			let emavoptions = {path: '/'};
56			if ( $body.hasClass('logged-in') == true && $body.hasClass('administrator') == true && emavstatus == 'admin-only') {
57				// skip setting cookie for testing mode
58			} else {
59				Cookies.set('emav-age-verified', 1, emavoptions);
60			}
61			$body.css('position', '');
62			$body.css('width', '');
63			$(".emav-error").fadeOut();
64			$emavoverlay.fadeOut();
65		});
66		$("#emav_not_confirm_age").on('click touch', function () {
67			$(".emav-error").fadeIn();
68		});
69	}
70});
71// Embed jQuery js-cookies file to remove remote call
72/*!
73 * JavaScript Cookie v2.2.1
74 * Minified by jsDelivr using Terser v3.14.1.
75 * Original file: /npm/[email protected]/src/js.cookie.js
76 */
77!function(e){var n;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var t=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=t,o}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(e){return e.replace(/(%[0-9A-Z]{2}
77)+/g,decodeURIComponent)}return function t(o){function r(){}function i(n,t,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(t);/^[\{\[]/.test(c)&&(t=c)}catch(e){}t=o.write?o.write(t,n):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var f="";for(var u in i)i[u]&&(f+="; "+u,!0!==i[u]&&(f+="="+i[u].split(";")[0]));return document.cookie=n+"="+t+f}}function c(e,t){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var f=i[c].split("="),u=f.slice(1).join("=");t||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var a=n(f[0]);if(u=(o.read||o)(u,a)||n(u),t)try{u=JSON.parse(u)}catch(e){}if(r[a]=u,e===a)break}catch(e){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return c(e,!1)},r.getJSON=function(e){return c(e,!0)},r.remove=function(n,t){i(n,"",e(t,{expires:-1}))},r.defaults={},r.withConverter=t,r}(function(){})});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.