-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.html
168 lines (153 loc) · 8.51 KB
/
index.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<link href="css/styles.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link rel="icon" type="image/png" href="assets/favicon.png"/>
<title>CoWIN Booking</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2TD2EHC7LN"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-2TD2EHC7LN');
</script>
</head>
<body>
<div role="main" class="container mb-5">
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand mx-auto" href="/cowin">CoWIN Vaccine Booking</a>
</nav>
<div class="container d-flex flex-row flex-wrap mt-5 pt-4">
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text" for="district-input">District</label>
<input type="text" class="form-control" list="district" id="district-input" placeholder="Type to search...">
</div>
<datalist id="district"></datalist>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text" for="pincode-input">Pincodes</label>
<input type="text" class="form-control" id="pincode-input" placeholder="Comma separated...">
<button type="button" class="btn btn-dark" data-bs-toggle="popover" title="How does this work?" data-bs-content="If you leave this empty, you can get booked for any centers available in your district. If you only want to book from centers in specific picodes, you can enter them here.">?</button>
</div>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text">Age</label>
<input type="radio" id="a-18" name="age" value="a-18" class="btn-check" checked><label for="a-18" class="btn btn-outline-dark">18+</label>
<input type="radio" id="a-45" name="age" value="a-45" class="btn-check"><label for="a-45" class="btn btn-outline-dark">45+</label>
</div>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text">Dose</label>
<input type="radio" id="d-1" name="dose" value="d-1" class="btn-check" checked><label for="d-1" class="btn btn-outline-dark">1st</label>
<input type="radio" id="d-2" name="dose" value="d-2" class="btn-check"><label for="d-2" class="btn btn-outline-dark">2nd</label>
</div>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text">Vaccine</label>
<input type="radio" id="v-any" name="vaccine" value="v-any" class="btn-check" checked><label for="v-any" id="v-any-label" class="btn btn-outline-dark">Any</label>
<input type="radio" id="v-covishield" name="vaccine" value="v-covishield" class="btn-check"><label for="v-covishield" class="btn btn-outline-dark">Covishield</label>
<input type="radio" id="v-covaxin" name="vaccine" value="v-covaxin" class="btn-check"><label for="v-covaxin" class="btn btn-outline-dark">Covaxin</label>
<input type="radio" id="v-sputnik-v" name="vaccine" value="v-sputnik-v" class="btn-check"><label for="v-sputnik-v" class="btn btn-outline-dark">Sputnik V</label>
</div>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text">Fees</label>
<input type="radio" id="f-free" name="fees" value="f-free" class="btn-check" checked><label for="f-free" class="btn btn-outline-dark">Free</label>
<input type="radio" id="f-paid" name="fees" value="f-paid" class="btn-check"><label for="f-paid" class="btn btn-outline-dark">Paid</label>
<input type="radio" id="f-any" name="fees" value="f-any" class="btn-check"><label for="f-any" class="btn btn-outline-dark">Any</label>
</div>
</div>
<div class="form-group p-1">
<div class="input-group">
<label class="input-group-text" for="date">Date</label>
<input type="date" id="date" class="form-control">
</div>
</div>
</div>
<div class="container d-flex flex-row flex-wrap pt-4">
<div class="form-group p-1" id="mobile-div">
<div class="input-group">
<label for="mobile" class="input-group-text">Login</label>
<input type="number" id="mobile" class="form-control" placeholder="Enter 10 digit mobile...">
<input type="button" class="btn btn-outline-dark" id="get-otp" value="Get OTP">
</div>
</div>
<div class="form-group p-1" id="otp-div">
<div class="input-group">
<label for="otp" class="input-group-text">OTP</label>
<input type="number" id="otp" class="form-control" placeholder="Enter OTP..." autocomplete="off">
<input type="button" class="btn btn-outline-dark" id="confirm-otp" value="Login">
</div>
</div>
<div class="form-group p-1" id="login-div">
<div class="input-group">
<label class="input-group-text">Logged In</label>
<button class="btn btn-secondary" id="expiring">session expiring soon</button>
<input type="button" class="btn btn-outline-dark" id="relogin" value="Relogin">
</div>
</div>
<div class="form-group p-1" id="ben-div">
<div class="input-group">
<label class="input-group-text">Beneficiaries</label>
<button id="ben" value="ben" class="btn btn-secondary">Neel Patel</button>
</div>
</div>
<div class="form-group p-1" id="logout-div">
<div class="input-group">
<input type="button" class="btn btn-outline-dark" id="logout" value="Logout">
</div>
</div>
</div>
<div class="container d-flex flex-row flex-wrap pt-4">
<div class="form-group p-1" id="fetch-div">
<div class="input-group">
<label class="input-group-text" id="fetch-label">Fetch Available Slots</label>
<input type="button" class="btn btn-outline-dark" id="start-fetch" value="Start">
</div>
</div>
<div class="form-group p-1" id="fetching-div">
<div class="input-group">
<label class="input-group-text" id="fetching-label">Fetching Slots</label>
<input type="button" class="btn btn-outline-dark" id="stop-fetch" value="Stop">
</div>
</div>
<div class="form-group p-1" id="captcha-div">
<div class="input-group">
<label class="input-group-text" for="captcha-input">Captcha</label>
<div id="captcha" style="border: 1px solid darkgray"></div>
<input type="text" id="captcha-input" class="form-control" placeholder="Enter captcha..." autocomplete="off">
<input type="button" class="btn btn-outline-dark" id="book" value="Book">
</div>
</div>
</div>
<div id="booking-div" class="container pt-3"></div>
<div id="results" class="container pt-3"></div>
<div class="pt-4">
<ul class="list-group-item mb-0"><i>About:</i> Book vaccine slots for <a href="https://selfregistration.cowin.gov.in/">CoWIN</a> without unnecessary clicks and effort. <i><a href="https://www.linkedin.com/posts/neelpy_cowin-cowinregistration-cowinapp-activity-6798692225581666304-Ji3y" target="_blank">[read more]</a></i>, <i><a href="#" id="share">[share]</a></i></ul>
<ul class="list-group-item mb-0"><i>Implementation:</i> Created using the <a href="https://apisetu.gov.in/public/marketplace/api/cowin" target="_blank">CoWIN Public API</a>. This tool is open source, you can find the code here <i><a href="https://github.com/neelpy/cowin" target="_blank">[link]</a></i>.</ul>
<ul class="list-group-item mb-0"><i>Feedback:</i> If you find any bugs or have any suggestions to improve the tool, you may report them here <i><a href="https://github.com/neelpy/cowin/issues" target="_blank">[link]</a></i>.</ul>
</div>
</div>
<footer class="bg-dark">
<div>Credits: <a href="https://github.com/neelpy/cowin/graphs/contributors" target="_blank" class="link">Contributors</a></div>
</footer>
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
<script src="js/districts.js"></script>
<script src="js/init.js"></script>
<script src="js/script.js"></script>
</body>
</html>