Skip to content

Commit

Permalink
Add devtools greeting
Browse files Browse the repository at this point in the history
  • Loading branch information
artemave committed Oct 31, 2023
1 parent 03e9a14 commit 2460c46
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="description" content="Star Logs - Star Wars + git logs">
<meta name="description" content="Star Logs = Star Wars + git logs">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/styles.css" media="screen" type="text/css" />
<script type="module" src="/js/404.js" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="description" content="Star Logs - Star Wars + git logs">
<meta name="description" content="Star Logs = Star Wars + git logs">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/styles.css" media="screen" type="text/css" />
<script type="module" src="/js/index.js" defer></script>
Expand Down
1 change: 1 addition & 0 deletions js/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('/')

Expand Down
1 change: 1 addition & 0 deletions js/greeting.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.info('%cStar Logs => https://github.com/artemave/starlogs', 'color:#a0d8fa; font-family: Pathway Gothic One, sans-serif; font-size: 14px;')
1 change: 1 addition & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions js/sounds.js
Original file line number Diff line number Diff line change
@@ -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 <audio> elements) is that
// on ios only a single audio element is allowed to play (perhaps because there's only one user interation?).
// And that element must be 'autoplay'. https://stackoverflow.com/a/57547943/51209

class Sounds {
#audio
Expand Down

0 comments on commit 2460c46

Please sign in to comment.