11import routes from './routes.json' ;
22
33export default [
4- [
5- "script" ,
6- {
7- type : "text/javascript" ,
8- id : "hs-script-loader" ,
9- async : true ,
10- defer : true ,
11- src : "//js.hs-scripts.com/5408110.js" ,
12- } ,
13- ] ,
14- [
15- "script" ,
16- { } ,
17- `
18- (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
19- new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
20- j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
21- 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
22- })(window,document,'script','dataLayer','GTM-T538N4K');
23- ` ,
24- ] ,
25- [
26- "script" ,
27- { } ,
28- `
29- (function() {
30- var routes = ${ JSON . stringify ( routes ) } ;
31-
32- // Function to normalize a URL by removing a trailing slash and leading characters
33- function normalizeUrl(url) {
34- url = url.endsWith('/') ? url.slice(0, -1) : url;
35- url = url.startsWith('/') ? url.slice(1) : url;
36- url = url.startsWith('?') ? url.slice(1) : url;
37- return url;
38- }
4+ [
5+ "script" ,
6+ {
7+ type : "text/javascript" ,
8+ id : "hs-script-loader" ,
9+ async : true ,
10+ defer : true ,
11+ src : "//js.hs-scripts.com/5408110.js" ,
12+ } ,
13+ ] ,
14+ [
15+ "script" ,
16+ { } ,
17+ `
18+ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
19+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
20+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
21+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
22+ })(window,document,'script','dataLayer','GTM-T538N4K');
23+ ` ,
24+ ] ,
25+ [
26+ "script" ,
27+ { } ,
28+ `
29+ (function() {
30+ var routes = ${ JSON . stringify ( routes ) } ;
3931
40- var currentPath = window.location.pathname + window.location.search + window.location.hash;
41- currentPath = normalizeUrl(currentPath);
42-
43- for (var route_url in routes) {
44- if (normalizeUrl(route_url) === currentPath) {
45- window.location.href = routes[route_url];
46- break; // Exit the loop after redirecting
47- }
48- }
49- })();
50- ` ,
51- ] ,
52- [
53- "script" ,
54- { } ,
55- `
56- (function() {
57- // Trigger the scroll event without actually scrolling
58- function triggerScrollEvent() {
59- const targetElement = window;
60- const scrollEvent = new Event('scroll', {
61- bubbles: true,
62- cancelable: true,
63- });
64- targetElement.dispatchEvent(scrollEvent);
65- }
32+ // Function to normalize a URL by removing a trailing slash and leading characters
33+ function normalizeUrl(url) {
34+ url = url.endsWith('/') ? url.slice(0, -1) : url;
35+ url = url.startsWith('/') ? url.slice(1) : url;
36+ url = url.startsWith('?') ? url.slice(1) : url;
37+ return url;
38+ }
39+
40+ var currentPath = window.location.pathname + window.location.search + window.location.hash;
41+ currentPath = normalizeUrl(currentPath);
6642
67- // Call the triggerScrollEvent and scrollBodyDown functions after the page is fully loaded
68- window.addEventListener('load', () => {
69- triggerScrollEvent();
70- });
71- })();
72- ` ,
73- ]
74- ] ;
43+ for (var route_url in routes) {
44+ if (normalizeUrl(route_url) === currentPath) {
45+ window.location.href = routes[route_url];
46+ break; // Exit the loop after redirecting
47+ }
48+ }
49+ })();
50+ ` ,
51+ ] ,
52+ [
53+ "script" ,
54+ { } ,
55+ `
56+ (function() {
57+ // Trigger the scroll event without actually scrolling
58+ function triggerScrollEvent() {
59+ const targetElement = window;
60+ const scrollEvent = new Event('scroll', {
61+ bubbles: true,
62+ cancelable: true,
63+ });
64+ targetElement.dispatchEvent(scrollEvent);
65+ }
7566
76-
67+ // Call the triggerScrollEvent and scrollBodyDown functions after the page is fully loaded
68+ window.addEventListener('load', () => {
69+ triggerScrollEvent();
70+ });
71+ })();
72+ ` ,
73+ ] ,
74+ [
75+ "meta" ,
76+ {
77+ name : "google-site-verification" ,
78+ content : "5-Q2NFM8YQ1f64j819in5tsqnlwNjQXX6Y0PQzmBEcs" ,
79+ } ,
80+ ] ,
81+ ] ;
0 commit comments