(function(ns){ ns.DependencyLoaderSettings = { scripts: function() { return [ CF.Cookies.Loader.scripts.cookies ] } }; })(extend('CF.Cookies')); (function (ns) { ns.DependencyLoader = function () { var settings = CF.Cookies.DependencyLoaderSettings || {}; if (typeof jQuery === 'undefined') { throw new Error('JQuery not found! Required version >= 2.2.4'); } $.ajaxPrefilter(function (options) { if (window.location.hostname !== 'portal.extraportfel.pl') { options.crossDomain ={ crossDomain: true }; options.xhrFields = { withCredentials: true }; } }); $.ajaxSetup({ cache: true }); function worker(scripts, finishCb) { if (scripts.length <= 0 || !scripts) { finishCb(); return; } var script = scripts.shift(); $.getScript(script, function () { worker(scripts, finishCb); }); } this.load = function (finishCb) { if (typeof settings.beforeLoad == 'function') { settings.beforeLoad(); } var scripts = typeof settings.scripts == 'function' ? settings.scripts() : settings.scripts; worker(scripts, finishCb); }; } })(extend('CF.Cookies')); function extend(ns_string) { window.CF = window.CF || {}; var parts = ns_string.split('.'), parent = window.CF, pl, i; if (parts[0] == "CF") { parts = parts.slice(1); } pl = parts.length; for (i = 0; i < pl; i++) { //create a property if it doesnt exist if (typeof parent[parts[i]] == 'undefined') { parent[parts[i]] = {}; } parent = parent[parts[i]]; } return parent; }(function (ns) { ns.scripts = { cookies: "https://portal.extraportfel.pl/generated/js/cookie-manager.js?2dd5a0e99b0d33c2a849ecc0a09f16af3900a02895477259f97d0ef50c4de17a_cf3af3a7c60f1d65c4ec55f82bd342df712df783761c4567116802cc104011b3", }; ns.stylesheetUrl = "https://portal.extraportfel.pl/generated/css/cookie-manager.css?2dd5a0e99b0d33c2a849ecc0a09f16af3900a02895477259f97d0ef50c4de17a_cf3af3a7c60f1d65c4ec55f82bd342df712df783761c4567116802cc104011b3"; ns.popupUrl = "https://portal.extraportfel.pl/cookie-manager/popup"; ns.decisionStorage = "https://portal.extraportfel.pl/cookie-manager/decision"; }) (extend('CF.Cookies.Loader'));