Skip to content

Commit

Permalink
Fix embedding custom JavaScript file via source URL in Custom (script)
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub committed Mar 7, 2022
1 parent 976d290 commit 5b220f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Resources/public/scripts/cookiebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ let ContaoCookiebar = (function () {
let scripts = document.querySelectorAll('script[src]');
let host = getHostname(resource.src);
for (let i = scripts.length; i--;) {
if (scripts[i].src.indexOf(host) !== -1){
if (scripts[i].src.indexOf(host) !== -1 && host !== window.location.host){
return false;
}
}
Expand Down
Loading

0 comments on commit 5b220f3

Please sign in to comment.