Skip to content

Commit

Permalink
chore(site): removes web analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Dec 24, 2024
1 parent 95d6c7d commit 1dedd4d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 37 deletions.
1 change: 0 additions & 1 deletion docs/config/prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"sourceFile": "smcat-online-interpreter.min.js",
"materialTheme": "https://code.getmdl.io/1.3.0/material.purple-pink.min.css",
"trackingID": "G-DCPVBY7NNV",
"google-site-verification-key": "K0j5zueKp7lYKMR7WihmcTJbLpHxBOpaXZEI_s0nHTw",
"root": "",
"background-color": "inherit"
}
14 changes: 3 additions & 11 deletions docs/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<meta
http-equiv="content-security-policy"
content="
connect-src 'self' https://region1.google-analytics.com;
connect-src 'self';
font-src 'self' https://fonts.gstatic.com/s/materialicons/;
frame-src 'none';
img-src 'self' data: https://region1.google-analytics.com;
img-src 'self';
manifest-src 'self';
media-src 'none';
object-src 'none';
script-src 'self' 'unsafe-eval' 'nonce-known-inline-script' https://code.getmdl.io/1.3.0/material.min.js https://www.googletagmanager.com/gtag/js;
script-src 'self' 'unsafe-eval' https://code.getmdl.io/1.3.0/material.min.js;
style-src 'unsafe-inline' https://fonts.googleapis.com/icon https://code.getmdl.io/1.3.0/material.purple-pink.min.css;
form-action 'none';
navigate-to 'none'"
Expand All @@ -36,18 +36,10 @@
<meta property="og:url" content="{{canonical-url}}">
<meta property="og:image" content="{{social-media-image}}">
<meta property="og:image:type" content="image/png" />
<meta name="google-site-verification" content="{{google-site-verification-key}}" />
<link rel="canonical" href="{{canonical-url}}">
<script nonce="known-inline-script">let LOG = {{loggingEnabled}};</script>
<script src="{{sourceFile}}" type="module" defer integrity="{{SRIHash}}"></script>
<script defer src="https://code.getmdl.io/1.3.0/material.min.js" async></script>
<script async src="https://www.googletagmanager.com/gtag/js?id={{trackingID}}"></script>
<script nonce="known-inline-script">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{trackingID}}');
</script>
{{!-- onLoad the loadEventEnd hasn't fired yet (and 'loadend' doesn't work on the window), --}}
{{!-- so to measure the onLoad we have two choices: --}}
{{!-- - use timing.loadEventStart(which usually fires a few milliseconds before and will be off - ish) --}}
Expand Down
16 changes: 4 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<meta
http-equiv="content-security-policy"
content="
connect-src 'self' https://region1.google-analytics.com;
connect-src 'self';
font-src 'self' https://fonts.gstatic.com/s/materialicons/;
frame-src 'none';
img-src 'self' data: https://region1.google-analytics.com;
img-src 'self';
manifest-src 'self';
media-src 'none';
object-src 'none';
script-src 'self' 'unsafe-eval' 'nonce-known-inline-script' https://code.getmdl.io/1.3.0/material.min.js https://www.googletagmanager.com/gtag/js;
script-src 'self' 'unsafe-eval' https://code.getmdl.io/1.3.0/material.min.js;
style-src 'unsafe-inline' https://fonts.googleapis.com/icon https://code.getmdl.io/1.3.0/material.purple-pink.min.css;
form-action 'none';
navigate-to 'none'"
Expand All @@ -34,18 +34,10 @@
<meta property="og:url" content="https://state-machine-cat.js.org">
<meta property="og:image" content="https://state-machine-cat.js.org/pics/state-machine-cat-social-sharing-picture.png">
<meta property="og:image:type" content="image/png" />
<meta name="google-site-verification" content="K0j5zueKp7lYKMR7WihmcTJbLpHxBOpaXZEI_s0nHTw" />
<link rel="canonical" href="https://state-machine-cat.js.org">
<script nonce="known-inline-script">let LOG = false;</script>
<script src="smcat-online-interpreter.min.js" type="module" defer integrity="sha512-w0Aho57pbDJ5cGWPTQZ3uQQzskOuiJgqhbmCIMnUajySy/2fp3QCSs7q6XAOFHpZvu7DELt53wta50zf4tYQoA=="></script>
<script src="smcat-online-interpreter.min.js" type="module" defer integrity="sha512-3vcVtQMJN2N6fqB10BdsPfqDoL3KjNhCdE5Zn/h10PEJWTArwLYVgkjhf4kDgRABgC5iwHVgDR1g3D99cJscqQ=="></script>
<script defer src="https://code.getmdl.io/1.3.0/material.min.js" async></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DCPVBY7NNV"></script>
<script nonce="known-inline-script">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-DCPVBY7NNV');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="purple">
<style>
Expand Down
5 changes: 0 additions & 5 deletions docs/smcat-online-interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ function hideContextMenu() {

function logError(pError) {
LOG && console.error(pError);
gtag("event", "exception", {
description: pError,
fatal: false,
});
}

gModel = getState(LOCALSTORAGE_KEY, gModel);
Expand Down Expand Up @@ -317,4 +313,3 @@ window.version.innerHTML = "state machine cat ${version}".replace(
setTextAreaToWindowHeight();
showModel(gModel);
/* global LOG */
/* global gtag */
2 changes: 1 addition & 1 deletion docs/smcat-online-interpreter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1dedd4d

Please sign in to comment.