MaNTrA JSY Auto Filler  —  Chrome extension (version 2)
Developed by Shawab Khan  —  https://shawab.space
Website & license keys: https://portal.cyberwarrior.co.in
=====================================================================

WHAT IT DOES
For every Mantra Unique Id in your Excel sheet, on the MaNTrA
"JSY Beneficiaries > Pending" page it:
  1. Searches the Mantra Unique Id in the page's Search box
  2. Clicks the pink pencil (edit) button of that same entry and checks
     that the form shows the same Mantra Unique Id
  3. Fills:
       - Address .......... from the sheet's "Block" column, only if the
                            portal's Address box is empty
                            ("Aligarh DHQ" is written as "Aligarh")
       - SNA SPARSH Code .. from the sheet
       - Scheme Code ...... the one you choose when you upload the sheet
       - Area Type ........ from the sheet (Rural / Urban)
  4. Clicks Submit, then moves to the next entry
The portal's own Block box is never touched (it stays empty).
All other columns in the sheet are ignored.


INSTALL (one time, about 2 minutes)
  1. Unzip the downloaded zip file. You get a folder with
     manifest.json inside it. Keep this folder (don't delete it).
  2. In Chrome, open:  chrome://extensions
  3. Turn ON "Developer mode" (top-right switch).
  4. Click "Load unpacked" and select the unzipped folder.
  5. Click the puzzle-piece icon in Chrome's toolbar and pin
     "MaNTrA JSY Auto Filler".
  6. Open (or refresh) the MaNTrA JSY Beneficiaries page.
     A purple "MaNTrA JSY Auto Filler" panel appears bottom-right.
  7. Type your license key (MJAF-XXXX-XXXX-XXXX-XXXX), tick the box to
     agree to the License Agreement, and press Activate.


YOUR LICENSE KEY
  - One key works on one computer at a time.
  - New computer? Install the extension there and enter the same key —
    it moves there and stops on the old computer.
  - A key can be moved a limited number of times per week. If you hit
    the limit, contact the seller.
  - "Remove key from this computer" is under Settings in the panel.
  - The extension checks your key with the license server from time to
    time, so keep your internet on.


HOW TO USE
  1. On the portal, set the filters at the top (Financial Year,
     Facility, dates) and click Filter, so your entries are in the list.
  2. In the panel, click "Upload Excel" and pick the sheet.
  3. A box asks for the Scheme Code for this sheet (asked every time
     you upload a sheet). If some rows have no Area Type, it also asks
     what to use for those: Rural, Urban, or "Ask me for each entry".
  4. Click "Start".

  Buttons:
    Start / Continue ... begin, or carry on from where it stopped
    Pause / Resume ..... hold after the current step, then continue
    Stop ............... stop; press Continue later to carry on
    Skip current ....... leave the current entry and move on
    Retry skipped & errors ... try those entries again
    Download report .... a CSV list of every entry and what happened
    –  (minimise)   ×  (hide; open again from the extension icon)
  You can drag the panel by its purple top bar.

  Settings (click "Settings" in the panel):
    - Wait between entries (seconds)  — 0 by default (no waiting)
    - Wait after each field (seconds) — 0 by default (no waiting)
      With 0 it goes as fast as the portal responds. Raise these only
      if the portal struggles.
    - Ask me before every Submit (safe test mode — good for the
      first few entries)
    - If search can't find an ID, show all entries and look again
      (off by default: loading all entries is slow on this portal)
    - Sound on/off, and "Test sound"


WHEN SOMETHING GOES WRONG
  The panel beeps, the tab title flashes "ACTION NEEDED", and a box
  shows the portal's message (bank details, account number, missing
  address, SPARSH code warning, etc.). You can:
    - fix the form yourself, then press "Submit again" / "Submit now"
      (or press the portal's own Submit button — that works too)
    - press "Skip this entry" — or the portal's Cancel button — and
      it moves to the next entry
    - press "Stop automation"
  If the portal stops responding, the box offers
  "Reload page & retry": the page reloads and it carries on from the
  same entry.

  After each successful Submit the portal reloads the page by itself;
  the extension waits for the list to load and continues on its own.
  (That reload is the slowest part of each entry — it is the portal's
  own behaviour.)


GOOD TO KNOW
  - Keep the MaNTrA tab open and visible while it runs.
  - "Not found" means the ID was not in the current list — check the
    filters at the top, or it may already be submitted.
  - Progress is saved. If you close the tab by mistake, open the page
    again and press Resume/Continue.
  - New versions: download again from https://portal.cyberwarrior.co.in,
    unzip over the old folder, then press the reload icon on the
    extension's card in chrome://extensions. Your key stays active.
  - The extension only runs on mantra.upnrhm.gov.in JSY beneficiary
    pages, and your sheet stays on your computer.
