Skip to content

Commit

Permalink
Footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
neelpy committed May 29, 2021
1 parent efbbfa8 commit 61252ac
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
15 changes: 5 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,11 @@

<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">
This may be useful if you are registered for the vaccine on <a href="https://selfregistration.cowin.gov.in/" target="_blank">Co-WIN</a> and are struggling to find a center with an available slot in your district.<br>
Once you find an available slot, book the slots from the official portal for <a href="https://selfregistration.cowin.gov.in/" target="_blank">Co-WIN</a> Registration.
</ul>
<ul class="list-group-item mb-0"><i>Features:</i> Saving your state and district, removing unavailable slots, alert on finding an available slot, the rest is same as the original <a href="https://selfregistration.cowin.gov.in/" target="_blank">Co-WIN</a> app.</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">Co-WIN 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>Known bugs:</i> The data might be inconsistent with the actual website, because the public API gives slightly older cached data.</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://docs.google.com/forms/d/e/1FAIpQLScEH36ntcFE1cseCneS_zeauw_8nEZktwvVV6OEjLhH81pDUw/viewform?usp=sf_link" target="_blank">[link]</a></i></ul>
</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>

Expand Down
19 changes: 19 additions & 0 deletions js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ $dose.change(function() {
}
})

$('#share').click(function() {
if (navigator.share) {
navigator.share({
title: 'CoWIN Vaccine Booking',
text: 'Check out this tool for booking vaccine slots on CoWIN without unnecessary clicks or effort.',
url: 'https://neelpy.github.io/cowin',
})
.then(() => console.log('Successful share'))
.catch((error) => console.log('Error sharing', error));
} else {
console.log('browser not supported for share');
}
})

var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl)
Expand Down Expand Up @@ -151,6 +165,11 @@ $(document).ready(async function () {
const month = ("0" + (now.getMonth() + 1)).slice(-2);
const today = now.getFullYear()+"-"+(month)+"-"+(day) ;
$date.val(today);

$captchaInput.keypress(function(e){
if(e.keyCode==13)
$book.click();
});
})


Expand Down
1 change: 1 addition & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ async function getCaptcha() {
headers: headers()
})
$captcha.html(res.data.captcha)
$captchaInput.val('')
$captchaDiv.show()
stopFetchSlots()
$fetchDiv.hide()
Expand Down

0 comments on commit 61252ac

Please sign in to comment.