Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/js/404.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
document.addEventListener('DOMContentLoaded', function () { plausible('404', { props: { path: document.location.pathname } }); });
umami.track('404', { path: document.location.pathname });
8 changes: 8 additions & 0 deletions assets/js/base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }

$('a').each(function() {
const $a = $(this);
if ($a[0].host !== window.location.host && !$a.attr('data-umami-event')) {
$a.attr('data-umami-event', 'outbound-link-click');
$a.attr('data-umami-event-url', $a.attr('href'));
}
});

function determineGitHubStargazersCount(locale, globalData) {
$.getJSON('https://api.cryptomator.org/desktop/repo.json', data => {
globalData.githubStargazers = formatNumber(data.stargazers_count, locale);
Expand Down
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ block = true
[[server.headers]]
for = '/**'
[server.headers.values]
Content-Security-Policy = "default-src 'none'; script-src 'self' 'unsafe-eval' https://plausible.skymatic.de/ https://community.cryptomator.org/ https://js.stripe.com/ https://*.paddle.com/ https://www.google.com/ https://www.gstatic.com/; style-src 'self' 'unsafe-inline' https://*.paddle.com/; img-src 'self' data: https://static.cryptomator.org/ https://*.paddle.com/ https://paddle.s3.amazonaws.com/; connect-src 'self' https://api.cryptomator.org/ https://store.cryptomator.org/ https://plausible.skymatic.de/ http://localhost:8787/; font-src 'self'; media-src https://static.cryptomator.org/; frame-src https://community.cryptomator.org/ https://js.stripe.com/ https://*.paddle.com/ https://www.google.com/; base-uri 'self'; form-action 'self' https://www.paypal.com/ https://www.coinpayments.net/; frame-ancestors 'none'"
Content-Security-Policy = "default-src 'none'; script-src 'self' 'unsafe-eval' https://umami.skymatic.de/ https://plausible.skymatic.de/ https://community.cryptomator.org/ https://js.stripe.com/ https://*.paddle.com/ https://www.google.com/ https://www.gstatic.com/; style-src 'self' 'unsafe-inline' https://*.paddle.com/; img-src 'self' data: https://static.cryptomator.org/ https://*.paddle.com/ https://paddle.s3.amazonaws.com/; connect-src 'self' https://api.cryptomator.org/ https://store.cryptomator.org/ https://umami.skymatic.de/ https://plausible.skymatic.de/ http://localhost:8787/; font-src 'self'; media-src https://static.cryptomator.org/; frame-src https://community.cryptomator.org/ https://js.stripe.com/ https://*.paddle.com/ https://www.google.com/; base-uri 'self'; form-action 'self' https://www.paypal.com/ https://www.coinpayments.net/; frame-ancestors 'none'"
Strict-Transport-Security = "max-age=31536000; includeSubDomains"
X-Content-Type-Options = "nosniff"
2 changes: 2 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@
{{ partial "footer.html" . }}
{{ if hugo.IsServer }}
<script data-domain="cryptomator.local" src="https://plausible.skymatic.de/js/script.file-downloads.hash.outbound-links.tagged-events.local.js" integrity="sha384-eSdyNyMq4w2Hzeb7A3pkbi2+zvI/skXuKlWsX5uzccigZEHDhHyBYoTASuSW+ZUQ" crossorigin="anonymous" defer></script>
<script src="https://umami.skymatic.de/script.js" data-website-id="57a36f3a-bd97-4d8a-9563-0e8d39ddb20c" integrity="sha384-/WQteTtaLX4nU22mvCeTi4Yz3iK/J3yZ2rKq5jDxPMlizEQGzgJOlSofJxh+bx4B" crossorigin="anonymous" defer></script>
{{ $baseJs := resources.Get "js/base.js" }}
<script type="text/javascript" src="{{ $baseJs.RelPermalink }}" defer></script>
{{ else }}
<script data-domain="cryptomator.org" src="https://plausible.skymatic.de/js/script.file-downloads.hash.outbound-links.tagged-events.js" integrity="sha384-egs8fp2Vph6JyDsFP2YT8pcJ87gHh8zcRbUNh9YokH9WugpdG6hBOlJI7+uxrBEf" crossorigin="anonymous" defer></script>
<script src="https://umami.skymatic.de/script.js" data-website-id="8d451e39-ffb2-4697-82c9-9f69eff497f1" integrity="sha384-/WQteTtaLX4nU22mvCeTi4Yz3iK/J3yZ2rKq5jDxPMlizEQGzgJOlSofJxh+bx4B" crossorigin="anonymous" defer></script>
{{ $baseJs := resources.Get "js/base.js" | minify | fingerprint }}
<script type="text/javascript" src="{{ $baseJs.RelPermalink }}" integrity="{{ $baseJs.Data.Integrity }}" defer></script>
{{ end }}
Expand Down