Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinLiquid committed May 12, 2024
1 parent a92e787 commit bad0e80
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,12 @@ try {
])
} catch (e) {
console.error('Failed to set localForage driver:', e)
// handle error appropriately
}

const params = new URLSearchParams(window.location.search)
if (params.has('crt')) {
document.body.classList.add('crt')
}
if (params.has('debug')) {
;(function () {
let src = 'https://cdn.jsdelivr.net/npm/eruda'
document.body.innerHTML += ('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>')
document.body.innerHTML += ('<scr' + 'ipt>eruda.init();</scr' + 'ipt>')
})()
}

const auth = (): SpotifyApi => SpotifyApi.withUserAuthorization(
import.meta.env.VITE_SPOTIFY_CLIENT_ID,
Expand Down
4 changes: 2 additions & 2 deletions src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class Player {
* @memberof Player
*/
async next (): Promise<void> {
if (this.queue.index >= this.queue.tracks.length - 1) { // Prefetch when there's only one track left
if (this.queue.index >= this.queue.tracks.length) {
if (this.sdk == null) {
return
}
Expand Down Expand Up @@ -444,7 +444,7 @@ class Player {
}

private handleError (error: any): void {
this.handleError(error)
console.error(error)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/searchpal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class SearchPalette {
})
)
}

/**
* Show the search palette
*
Expand Down

0 comments on commit bad0e80

Please sign in to comment.