{"ScriptPreparationCode":"/*your preparation JavaScript code goes here\r\nTo execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/\r\nasync function globalMeasureThatScriptPrepareFunction() {\r\n // This function is optional, feel free to remove it.\r\n // await someThing();\r\n}","TestCases":[{"Name":"actual","Code":"\t\tvar host = window.location.hostname;\r\n\t\tvar path_js;\r\n\t\tif (host.indexOf(\u0027www.sport.es\u0027) !== -1) {\r\n\t\t\tpath_js = \u0027https:/host/cds-statics/SPO/js/\u0027;\r\n\t\t} else if (host.indexOf(\u0027www.elperiodico.com\u0027) !== -1) {\r\n\t\t\tpath_js = \u0027https://host/cds-statics/EPC/js/\u0027;\r\n\t\t} else if (host.indexOf(\u0027www.epe.es\u0027) !== -1) {\r\n\t\t\tpath_js = \u0027https://host/cds-statics/EPE/js/\u0027;\r\n\t\t} else if (host.match(/woman.elperiodico.com|viajar.elperiodico.com|www.elperiodico.cat|www.stilo.es|www.codigonuevo.com|neomotor.epe.es/)) {\r\n\t\t\tpath_js = \u0027https://host/js/\u0027;\r\n\t\t} else {\r\n\t\t\tpath_js = \u0027https://host/estaticos/notificaciones-push/\u0027;\r\n\t\t}\r\n\r\n\t\tvar el = document.createElement(\u0027script\u0027)\r\n\t\tel.src = path_js \u002B \u0027sdk.min.js\u0027\r\n\t\tel.async = \u0027true\u0027\r\n\t\tel.addEventListener(\u0027load\u0027, function () {\r\n\t\t\tindigitall.init({\r\n\t\t\t\tappKey: \u0027123\u0027,\r\n\t\t\t\turlDeviceApi: \u0027https://eu2.device-api.indigitall.com/v1\u0027,\r\n\t\t\t\tworkerPath: path_js \u002B \u0027worker.min.js\u0027,\r\n\t\t\t\trequestLocation: false,\r\n\t\t\t\tonInitialized: function () {\r\n\t\t\t\t\twindow.dispatchEvent(new Event(\u0027indigitallReady\u0027))\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t})\r\n\t\tdocument.head.appendChild(el)","IsDeferred":false},{"Name":"futuro","Code":"var host = window.location.hostname;\r\nvar paths = {\r\n \u0027www.sport.es\u0027: \u0027cds-statics/SPO/js/\u0027,\r\n \u0027www.elperiodico.com\u0027: \u0027cds-statics/EPC/js/\u0027,\r\n \u0027www.epe.es\u0027: \u0027cds-statics/EPE/js/\u0027\r\n};\r\n\r\nvar regexPaths = [\r\n /woman.elperiodico.com/,\r\n /viajar.elperiodico.com/,\r\n /www.elperiodico.cat/,\r\n /www.stilo.es/,\r\n /www.codigonuevo.com/,\r\n /neomotor.epe.es/\r\n];\r\n\r\nvar path_js = \u0027estaticos/notificaciones-push/\u0027; // Default path\r\n\r\nif (paths[host]) {\r\n path_js = paths[host];\r\n} else if (regexPaths.some(function (regex) { return regex.test(host); })) {\r\n path_js = \u0027js/\u0027;\r\n}\r\n\r\npath_js = \u0027https://\u0027 \u002B host \u002B \u0027/\u0027 \u002B path_js;\r\n\r\nvar el = document.createElement(\u0027script\u0027);\r\nel.src = path_js \u002B \u0027sdk.min.js\u0027;\r\nel.async = true;\r\nel.addEventListener(\u0027load\u0027, function () {\r\n indigitall.init({\r\n appKey: \u0027123\u0027,\r\n urlDeviceApi: \u0027https://eu2.device-api.indigitall.com/v1\u0027,\r\n workerPath: path_js \u002B \u0027worker.min.js\u0027,\r\n requestLocation: false,\r\n onInitialized: function () {\r\n window.dispatchEvent(new Event(\u0027indigitallReady\u0027));\r\n }\r\n });\r\n});\r\ndocument.head.appendChild(el);\r\n","IsDeferred":false}]}