-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbotx.html
132 lines (126 loc) · 4.55 KB
/
botx.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>ESX NEW SHOP BY THANAUWT PROMRAUNGDET</title>
<link
href="https://fonts.googleapis.com/css?family=Roboto"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css?family=Athiti&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" type="text/css" href="css/materialize.css" />
<link rel="stylesheet" type="text/css" href="css/ui.css" />
</head>
<body>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script src="js/scripts.js"></script>
<script>
function setInputFilter(textbox, inputFilter) {
;[
"input",
"keydown",
"keyup",
"mousedown",
"mouseup",
"select",
"contextmenu",
"drop",
].forEach(function (event) {
textbox.addEventListener(event, function () {
if (inputFilter(this.value)) {
this.oldValue = this.value
this.oldSelectionStart = this.selectionStart
this.oldSelectionEnd = this.selectionEnd
} else if (this.hasOwnProperty("oldValue")) {
this.value = this.oldValue
this.setSelectionRange(
this.oldSelectionStart,
this.oldSelectionEnd
)
}
})
})
}
$(function () {
$(".modal").modal({
endingTop: "40%",
onOpenStart: function () {
$("#txt_count").val("1")
setTimeout(function () {
var CountInput = $("#txt_count")
var strLength = CountInput.val().length * 2
CountInput.focus()
CountInput[0].setSelectionRange(
strLength,
strLength
)
}, 100)
},
})
setInputFilter(
document.getElementById("txt_count"),
function (value) {
return /^\d*\.?\d*$/.test(value)
}
)
$("#txt_count").on("keypress", function (e) {
if (e.keyCode == 13) {
$("#item-submit").trigger("click")
$(".modal").modal("close")
}
})
})
</script>
<div id="modal_count" class="modal" style="width: 400px">
<div class="modal-content">
<input placeholder="จำนวน" id="txt_count" type="text" />
</div>
<div class="modal-footer">
<a
id="item-submit"
class="
modal-close
waves-effect waves-green
btn-flat
white-text
"
>ตกลง</a
>
<a
class="
modal-close
waves-effect waves-red
btn-flat
white-text
"
>ยกเลิก</a
>
</div>
</div>
<div class="ui">
<div class="middle">
<div class="inventory">
<div id="col-inventory">
<div class="header">Economy - ราคาตลาดกลาง</div>
<div
id="ShopResult"
class="row"
style="margin: 0; padding: 0"
></div>
</div>
</div>
</div>
</div>
<div id="dialog">
<div id="nearPlayers"></div>
</div>
</body>
</html>