Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

AutoBook Bharatgas TM


// ==UserScript==
// @name Gas
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://my.ebharatgas.com/*
// @grant none
// ==/UserScript==
//Format https://my.ebharatgas.com/bharatgas/login.jsp?r=1
function sleep(s) {
return new Promise(resolve => setTimeout(resolve, 1000*s));
}
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results === null )
return "";
else
return results[1];
}
function fn(){
return window.location.href.split('/').pop().split('#')[0].split('?')[0].split('.')[0];
}

cl=console.log;
(function() {
r=gup('r');
fn=fn();
if (fn=='login'){
if (r==1){
document.querySelector('#loginid').value='id';
document.querySelector('#password').value='pwd';
}

else{
return;
}
document.querySelector('#form1').action+='?r=Book';
document.querySelector('#form1').submit();
}
else if(fn=='Login'){
if (r=='Book'){
window.location=('https://my.ebharatgas.com/bharatgas/Customer_Placeorder.jsp?r=B2');
}
}
else if(fn=='Customer_Placeorder'){
document.querySelector('#popup').remove();
if (r=='B2'){
document.querySelector('#form1').action+='?r=B3';
document.querySelector('#form1').submit();
}
}
else if(fn=='WebRefillByConsumer'){
alert(3);
if (r=='B3'){
window.location=('https://my.ebharatgas.com/bharatgas/Logout');
}
}

})();


This post first appeared on SMARTMANOJ, please read the originial post: here

Share the post

AutoBook Bharatgas TM

×

Subscribe to Smartmanoj

Get updates delivered right to your inbox!

Thank you for your subscription

×