@ludens-reklame/profiler-client
Advanced tools
Comparing version 0.2.3 to 0.2.5
@@ -142,3 +142,13 @@ "use strict"; | ||
var ps = personalizations_1[i]; | ||
document.body.innerHTML += ps.code; | ||
if (ps.code.includes('<script>')) { | ||
var scriptContent = ps.code.match(new RegExp('<script>' + '(.*)' + '</script>')); | ||
if (scriptContent && scriptContent.length > 1) { | ||
var scriptTag = document.createElement('script'); | ||
scriptTag.innerHTML = scriptContent[1]; | ||
document.body.appendChild(scriptTag); | ||
} | ||
} | ||
else { | ||
document.body.insertAdjacentHTML('beforeend', ps.code); | ||
} | ||
} | ||
@@ -145,0 +155,0 @@ }); |
{ | ||
"name": "@ludens-reklame/profiler-client", | ||
"version": "0.2.3", | ||
"version": "0.2.5", | ||
"description": "Profiler for all", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14969
245