-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathApp.razor
81 lines (75 loc) · 3.51 KB
/
App.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#components-reconnect-modal {
display: none !important;
}
</style>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
@{#if NET8_0}
<link href="Blazor_Server_Demos_NET8.styles.css" rel="stylesheet" />
@{#endif}
@{#if NET9_0}
<link href="@Assets["Blazor_Server_Demos_NET9.styles.css"]" rel="stylesheet" />
<ImportMap />
@{#endif}
@{#if DEBUG || STAGING}
<link id="theme" href="_content/Syncfusion.Blazor.Themes/fluent2.css" rel="stylesheet" />
@{#else}
<link id="theme" crossorigin="anonymous" href="https://cdn.syncfusion.com/blazor/27.1.48/styles/fluent2.css" integrity="sha384-wwx/wkfkugAYS1p8AhlzxJp2DaI/bM9AzJEMJpssRdDdEjW0GJmugo+9pQsfSFtH" rel="stylesheet"/>
@{#endif}
<SampleMetaData @rendermode="@RenderMode.InteractiveServer" />
</head>
<body>
<AddHeaderTag @rendermode="@RenderMode.InteractiveServer" />
<div hidden id="sync-analytics" data-queue="EJ2 - Blazor - Demos"></div>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8WD8WN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<Routes @rendermode="@(new InteractiveServerRenderMode(true))" />
<script type="module" src="importResources.js"></script>
<script src="_framework/blazor.web.js"></script>
@{#if DEBUG || STAGING}
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
@{#else}
<script crossorigin="anonymous" integrity="sha384-mEzL12lC+cnpFS0AI3/AcUziLumM9f10x4flsLIeVNVMDzldCRyQ0BXzCqlhjeWF" src="https://cdn.syncfusion.com/blazor/27.1.48/syncfusion-blazor.min.js" type="text/javascript"></script>
@{#endif}
<div class="dynamic-resources"></div>
<script>
const consoleMessages = [];
let disconnectedFound = false;
const originalConsoleError = console.error;
console.error = function () {
originalConsoleError.apply(console, arguments);
// Capture the error message and push it to the array
const message = Array.from(arguments).join(" ");
consoleMessages.push({ type: "error", message });
};
// window.addEventListener('click',function(){
// for (const messageObject of consoleMessages) {
// if (messageObject.message.includes("Connection disconnected")) {
// disconnectedFound = true;
// break; // Stop the loop when "disconnected" is found in a message
// }
// }
// if(disconnectedFound) {
// window.location.reload();
// }
// });
// Google Tag Manager
setTimeout(function () {
(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-W8WD8WN');}, 2000);
// End Google Tag Manager
</script>
</body>
</html>