Skip to content

Commit

Permalink
fix: force call setup()
Browse files Browse the repository at this point in the history
  • Loading branch information
iwate committed Jan 30, 2024
1 parent 1ed6bb1 commit a18a37e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ $('body').on('click', '[type="submit"][data-gtm-radio]', function(e) {

$('link[rel=stylesheet][media=print]').each(function(i, el) { el.media = 'all'; });

$(window).on('DOMContentLoaded', function(e){setup(document.body)});
// https://w3c.github.io/uievents/#legacy-event-types
//$(document.body).on('DOMNodeInserted', function(e){setup(e.target)});
new MutationObserver(function(mutations) {
Expand Down Expand Up @@ -272,3 +271,5 @@ function pushDataLayer() {
}).catch(reject);
})
}

setup(document.body);
2 changes: 1 addition & 1 deletion templates/Layout/Default.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const suffix = document.querySelector('meta[name="resource-suffix"]').content;
const el = document.createElement('script');
el.src = "//" + location.host + prefix + 'bundle/script.js' + suffix;
el.integrity = "sha256-GWjht6rjxCHOV1CwzttW/yTv5MkoJvlFOnT4CAImEmk=";
el.integrity = "sha256-DAEXBpoeC/QIWJC74310ZDNTmnxnNPyJJV/rDiOnR2c=";
document.body.appendChild(el);
}())
</script>
Expand Down

0 comments on commit a18a37e

Please sign in to comment.