Some minor fixes

This commit is contained in:
Pünkösd Marcell 2021-06-14 23:28:57 +02:00
parent b7b00db726
commit 9534973faa
2 changed files with 27 additions and 11 deletions

View File

@ -1,17 +1,18 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0'>
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
</noscript> Please enable it to continue.</strong>
<div id="app"></div> </noscript>
<!-- built files will be auto injected --> <div id="app"></div>
</body> <!-- built files will be auto injected -->
</body>
</html> </html>

View File

@ -29,7 +29,8 @@ export default {
bgSound: null, bgSound: null,
soundsLoaded: 0, soundsLoaded: 0,
errorText: null, errorText: null,
columnWidth: 6 columnWidth: 6,
fullscreenRequested: false
} }
}, },
computed: { computed: {
@ -40,6 +41,20 @@ export default {
methods: { methods: {
play(sampleId) { play(sampleId) {
if (!this.fullscreenRequested) {
const elem = document.documentElement
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) { /* Safari */
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { /* IE11 */
elem.msRequestFullscreen();
}
this.fullscreenRequested = true
}
const sample = this.availableSounds[sampleId].howl const sample = this.availableSounds[sampleId].howl
if (sample.playing()) { if (sample.playing()) {