IndianRail.Gov.In - No More Nags

By Rajesh Soni Last update Dec 18, 2009 — Installed 562 times.
// ==UserScript==
// @name           IndianRailway
// @namespace      No Nags
// @include        *indianrail.gov.in*
// ==/UserScript==

// Rajesh Soni (rajeshgsoni@gmail.com)
// http://rajeshsoni.net


 document.body.innerHTML = document.body.innerHTML.replace("submitavailability", "submitavailability1");
 var s=document.createElement("script");

 s.innerHTML = ' function submitavailability(index) {  if(!validateday()) return false; document.Accavl.submit(); return true; } ';

 document.body.appendChild(s);


 document.body.innerHTML = document.body.innerHTML.replace("validatepnr", "validatepnr_old");
 var s=document.createElement("script");

 s.innerHTML = ' function validatepnr() { if(document.pnr_stat.lccp_pnrno1.value.length<3) { alert("1PNR Number cannot be left blank.");  document.pnr_stat.lccp_pnrno1.focus();    return false; }   if(document.pnr_stat.lccp_pnrno2.value.length<7) {  alert("PNR Number cannot be left blank.");  document.pnr_stat.lccp_pnrno2.focus();  return false; }  return true; } ';

 document.body.appendChild(s);