From 2460c46aa88f67ec38e8eb8251df32b34e82ebe9 Mon Sep 17 00:00:00 2001 From: artemave Date: Tue, 31 Oct 2023 11:58:41 +0100 Subject: [PATCH] Add devtools greeting --- 404.html | 2 +- index.html | 2 +- js/404.js | 1 + js/greeting.js | 1 + js/index.js | 1 + js/sounds.js | 8 +++++--- 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 js/greeting.js diff --git a/404.html b/404.html index 1ee9efc..87f8aa4 100644 --- a/404.html +++ b/404.html @@ -3,7 +3,7 @@ - + diff --git a/index.html b/index.html index dee142d..085e237 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + diff --git a/js/404.js b/js/404.js index 196f659..9b32687 100644 --- a/js/404.js +++ b/js/404.js @@ -4,6 +4,7 @@ import fetchCommitMessages from "./fetchCommitMessages.js" import performCrawl from "./performCrawl.js" import playErrorMessage from "./playErrorMessage.js" import registerScrollSoundEffect from "./registerScrollSoundEffect.js" +import './greeting.js' const repo = window.location.pathname.split('/').slice(-2).join('/') diff --git a/js/greeting.js b/js/greeting.js new file mode 100644 index 0000000..dd3d7ca --- /dev/null +++ b/js/greeting.js @@ -0,0 +1 @@ +console.info('%cStar Logs => https://github.com/artemave/starlogs', 'color:#a0d8fa; font-family: Pathway Gothic One, sans-serif; font-size: 14px;') diff --git a/js/index.js b/js/index.js index 91700f2..5834cd9 100644 --- a/js/index.js +++ b/js/index.js @@ -4,6 +4,7 @@ import performCrawl from './performCrawl.js' import registerScrollSoundEffect from './registerScrollSoundEffect.js' import playErrorMessage from './playErrorMessage.js' import sounds from './sounds.js' +import './greeting.js' let fetchCommitMessagesPromise let repo diff --git a/js/sounds.js b/js/sounds.js index 1a5c6f9..9d3af48 100644 --- a/js/sounds.js +++ b/js/sounds.js @@ -1,6 +1,8 @@ -// On ios, only one audio element is allowed to play (perhaps because there's only one user interation?) -// So we reuse a single audio element to play multiple sounds. -// https://stackoverflow.com/a/57547943/51209 +// Sounds reuses a single audio element to play multiple sounds. +// +// The reason this class exists (as opposed to simply using