mirror of
https://github.com/He4eT/BadBarSlots.git
synced 2026-05-05 00:17:23 +00:00
settings page & passing params
This commit is contained in:
parent
06dbeb7227
commit
4dd650782a
2 changed files with 62 additions and 10 deletions
46
index.html
Normal file
46
index.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Init Slot Machine</title>
|
||||
<link rel="stylesheet" href="css/style.css" type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<textarea name="" class="data" cols="20" rows="24">{"number":
|
||||
|
||||
3
|
||||
|
||||
,"items": [
|
||||
"Водка",
|
||||
|
||||
"Джин",
|
||||
"Тоник",
|
||||
"Гренадин",
|
||||
"Пусиджус",
|
||||
"Сопли",
|
||||
"Блю кюрасао",
|
||||
"Яблочный",
|
||||
"Апельсиновый",
|
||||
"Вишнёвый",
|
||||
|
||||
"Ничего"]}</textarea>
|
||||
<div class="start">
|
||||
OK
|
||||
</div>
|
||||
</div>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script>
|
||||
$(".start").on('click', () => {
|
||||
try {
|
||||
let data = JSON.parse($(".data").val())
|
||||
let params = encodeURI(JSON.stringify(data))
|
||||
let newUrl = location.href.replace("index.html", "slots.html")
|
||||
location.href = newUrl + "?" + params
|
||||
} catch (e) {
|
||||
alert(e)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue