1 2 3(function ($) { 4 5 if (!window.console) window.console = {}; 6if (!window.console.log) window.console.log = function () { 7}; 8 9 10$.fn.euCookieLawPopup = (function () { 11var _self = this; 12 13 14 _self.params = { 15cookiePolicyUrl: 'http://www.wimagguc.com/?cookie-policy', 16popupPosition: 'top', 17colorStyle: 'default', 18compactStyle: false, 19popupTitle: 'This website is using cookies', 20popupText: 'We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we\'ll assume that you are happy to receive all cookies on this website.', 21buttonContinueTitle: 'Continue', 22buttonLearnmoreTitle: 'Learn more', 23buttonLearnmoreOpenInNewWindow: true, 24agreementExpiresInDays: 30, 25autoAcceptCookiePolicy: false, 26htmlMarkup: null 27}; 28 29 30 _self.vars = { 31INITIALISED: false, 32HTML_MARKUP: null, 33COOKIE_NAME: 'EU_COOKIE_LAW_CONSENT' 34}; 35 36 37 38 39 var parseParameters = function (object, markup, settings) { 40if (object) { 41var className = $(object).attr('class') ? $(object).attr('class') : ''; 42if (className.indexOf('eupopup-top') > -1) { 43_self.params.popupPosition = 'top'; 44} 45else if (className.indexOf('eupopup-fixedtop') > -1) { 46_self.params.popupPosition = 'fixedtop'; 47} 48else if (className.indexOf('eupopup-bottomright') > -1) { 49_self.params.popupPosition = 'bottomright'; 50} 51else if (className.indexOf('eupopup-bottomleft') > -1) { 52_self.params.popupPosition = 'bottomleft'; 53} 54else if (className.indexOf('eupopup-bottom') > -1) { 55_self.params.popupPosition = 'bottom'; 56} 57else if (className.indexOf('eupopup-block') > -1) { 58_self.params.popupPosition = 'block'; 59} 60if (className.indexOf('eupopup-color-default') > -1) { 61_self.params.colorStyle = 'default'; 62} 63else if (className.indexOf('eupopup-color-inverse') > -1) { 64_self.params.colorStyle = 'inverse'; 65} 66if (className.indexOf('eupopup-style-compact') > -1) { 67_self.params.compactStyle = true; 68} 69} 70if (markup) { 71_self.params.htmlMarkup = markup; 72} 73if (settings) { 74if (typeof settings.cookiePolicyUrl !== 'undefined') { 75_self.params.cookiePolicyUrl = settings.cookiePolicyUrl; 76} 77if (typeof settings.popupPosition !== 'undefined') { 78_self.params.popupPosition = settings.popupPosition; 79} 80if (typeof settings.colorStyle !== 'undefined') { 81_self.params.colorStyle = settings.colorStyle; 82} 83if (typeof settings.popupTitle !== 'undefined') { 84_self.params.popupTitle = settings.popupTitle; 85} 86if (typeof settings.popupText !== 'undefined') { 87_self.params.popupText = settings.popupText; 88} 89if (typeof settings.buttonContinueTitle !== 'undefined') { 90_self.params.buttonContinueTitle = settings.buttonContinueTitle; 91} 92if (typeof settings.buttonLearnmoreTitle !== 'undefined') { 93_self.params.buttonLearnmoreTitle = settings.buttonLearnmoreTitle; 94} 95if (typeof settings.buttonLearnmoreOpenInNewWindow !== 'undefined') { 96_self.params.buttonLearnmoreOpenInNewWindow = settings.buttonLearnmoreOpenInNewWindow; 97} 98if (typeof settings.agreementExpiresInDays !== 'undefined') { 99_self.params.agreementExpiresInDays = settings.agreementExpiresInDays; 100} 101if (typeof settings.autoAcceptCookiePolicy !== 'undefined') { 102_self.params.autoAcceptCookiePolicy = settings.autoAcceptCookiePolicy; 103} 104if (typeof settings.htmlMarkup !== 'undefined') { 105_self.params.htmlMarkup = settings.htmlMarkup; 106} 107if (typeof settings.cookieName !== 'undefined') { 108_self.vars.COOKIE_NAME = settings.cookieName; 109} 110} 111}; 112var createHtmlMarkup = function () { 113if (_self.params.htmlMarkup) { 114return _self.params.htmlMarkup; 115} 116var html = 117'<div class="eupopup-container' + 118' eupopup-container-' + _self.params.popupPosition + 119(_self.params.compactStyle ? ' eupopup-style-compact' : '') + 120' eupopup-color-' + _self.params.colorStyle + '">' + 121'<div class="eupopup-head">' + _self.params.popupTitle + '</div>' + 122'<div class="eupopup-body">' + _self.params.popupText + '</div>' + 123'<div class="eupopup-buttons">' + 124'<a href="#" class="eupopup-button eupopup-button_1 btn btn-primary btn-sm">' + _self.params.buttonContinueTitle + '</a>' + 125'<a href="' + _self.params.cookiePolicyUrl + '"' + 126(_self.params.buttonLearnmoreOpenInNewWindow ? ' target=_blank ' : '') + 127' class="eupopup-button eupopup-button_2 btn btn-sm btn-secondary">' + _self.params.buttonLearnmoreTitle + '</a>' + 128'<div class="clearfix"></div>' + 129'</div>' + 130'<a href="#" class="eupopup-closebutton">x</a>' + 131'</div>'; 132return html; 133}; 134
135 var setUserAcceptsCookies = function (consent) { 136var d = new Date(); 137var expiresInDays = _self.params.agreementExpiresInDays * 24 * 60 * 60 * 1000; 138d.setTime(d.getTime() + expiresInDays); 139var expires = "expires=" + d.toGMTString(); 140document.cookie = _self.vars.COOKIE_NAME + '=' + consent + "; " + expires + ";path=/"; 141$(document).trigger("user_cookie_consent_changed", {'consent': consent}); 142}; 143 144 var userAlreadyAcceptedCookies = function () { 145var userAcceptedCookies = false; 146var cookies = document.cookie.split(";"); 147for (var i = 0; i < cookies.length; i++) { 148var c = cookies[i].trim(); 149if (c.indexOf(_self.vars.COOKIE_NAME) == 0) { 150userAcceptedCookies = c.substring(_self.vars.COOKIE_NAME.length + 1, c.length); 151} 152} 153return userAcceptedCookies; 154}; 155var hideContainer = function () { 156 157 $('.eupopup-container').animate({ 158opacity: 0, 159height: 0 160}, 200, function () { 161$('.eupopup-container').hide(0); 162}); 163}; 164 165 166 var publicfunc = { 167 168 init: function (settings) { 169parseParameters( 170$(".eupopup").first(), 171$(".eupopup-markup").html(), 172settings); 173 174 if (userAlreadyAcceptedCookies()) { 175return; 176} 177 178 if (_self.vars.INITIALISED) { 179return; 180} 181_self.vars.INITIALISED = true; 182 183 _self.vars.HTML_MARKUP = createHtmlMarkup(); 184if ($('.eupopup-block').length > 0) { 185$('.eupopup-block').append(_self.vars.HTML_MARKUP); 186} else { 187$('BODY').append(_self.vars.HTML_MARKUP); 188} 189$('.eupopup-button_1').click(function () { 190setUserAcceptsCookies(true); 191hideContainer(); 192return false; 193}); 194$('.eupopup-closebutton').click(function () { 195setUserAcceptsCookies(true); 196hideContainer(); 197return false; 198}); 199 200 201 202 $('.eupopup-container').show(); 203 204 if (_self.params.autoAcceptCookiePolicy) { 205setUserAcceptsCookies(true); 206} 207} 208}; 209return publicfunc; 210}); 211$(document).ready(function () { 212if ($(".eupopup").length > 0) { 213$(document).euCookieLawPopup().init({ 214'info': 'YOU_CAN_ADD_MORE_SETTINGS_HERE', 215'popupTitle': 'This website is using cookies. ', 216'popupText': 'We use them to give you the best experience. If you continue using our website, we\'ll assume that you are happy to receive all cookies on this website.' 217}); 218} 219}); 220}(jQuery));
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.