Custom scripting, #song=, translations
- A song can be linked directly by adding "#song=<id>" to the url, replace `<id>` with the id in the database, after loading it jumps immediately jumps to the difficulty selection
- Added tutorial translations
- Fixed song preview not playing
- Use text fallback for the logo when there are no vectors
- Increased combo cache by 1 pixel
- A custom javascript file can be loaded from config.json by defining "custom_js" value
- Added lots of events to help writing custom js files: `version-link, title-screen, language-change, song-select, song-select-move, song-select-difficulty, song-select-back, about, about-link, tutorial, import-songs, import-songs-default, session, session-start, session-end, debug, load-song, load-song-player2, load-song-unfocused, load-song-cancel, load-song-error, game-start, key-events, p2-game-end, p2-disconnected, p2-abandoned, pause, unpause, pause-restart, pause-song-select, game-lag, scoresheet, scoresheet-player2`
- Event syntax example:
```js
addEventListener("game-start", event => {
console.log("game-start", event.detail)
})
```
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
"confirm": ["start", "b", "ls", "rs"]
|
||||
}, this.onEnd.bind(this))
|
||||
|
||||
this.addDiag()
|
||||
pageEvents.send("about", this.addDiag())
|
||||
}
|
||||
onEnd(event){
|
||||
var touched = false
|
||||
@@ -145,12 +145,15 @@
|
||||
|
||||
var issueBody = strings.issueTemplate + "\n\n\n\n" + diag
|
||||
this.getLink(this.linkEmail).href += "?body=" + encodeURIComponent(issueBody.replace(/\n/g, "<br>\r\n"))
|
||||
|
||||
return diag
|
||||
}
|
||||
getLink(target){
|
||||
return target.getElementsByTagName("a")[0]
|
||||
}
|
||||
linkButton(event){
|
||||
this.getLink(event.currentTarget).click()
|
||||
pageEvents.send("about-link", event)
|
||||
}
|
||||
clean(){
|
||||
cancelTouch = true
|
||||
|
||||
Reference in New Issue
Block a user