]> gitweb.michael.orlitzky.com - charm-bypass.git/blobdiff - index.html.in
index.html.in: replace a few tabs with spaces
[charm-bypass.git] / index.html.in
index a76e2ec36e1ae4deaad74fdddf1599c020e414d7..763e2694220eae446b6e19c65551ca1600f1f2f6 100644 (file)
     </title>
 
     <style>
+      body {
+        /* For consistency with the SVG */
+        font-family: sans-serif;
+      }
+
       fieldset {
         margin-top: 1em;
         padding-top: 1em;
       <h2>it's transit equity y'all</h2>
 
       <p>
-        <em>Hint:</em> If you think the driver or fare inspector will
-        actually check it, the daily security code is the same on a
-        $2.00 BaltimoreLink ticket as it is on a $9.00 MARC Train
-        ticket. It's also the same on your friend's phone, or for
-        anyone else in Maryland that day.
+        <em>Hint:</em> If they start checking it, the daily security
+        code stays the same all day and is the same on a $2 bus ticket
+        as it is on a $9 MARC ticket. It's also the same on every phone.
       </p>
 
       <form>
           BAL_SEB: 3,
           BAL_WAS: 4,
           BAL_WBL: 1,
-          BCA_CPK_: 3,
-          BCA_WAS_: 4,
+          BCA_CPK: 3,
+          BCA_WAS: 4,
           BWE_BWI: 1,
           BWE_SEB: 1,
           BWE_WAS: 2,
           x.setCustomValidity('');
         })
 
-        if (compute_marc_zone(src.value, dest.value) === null) {
+        if (src.value === dest.value) {
+          let err = "Origin and destination are the same!";
+          dest.setCustomValidity(err);
+        }
+        else if (compute_marc_zone(src.value, dest.value) === null) {
           let err = "Origin and destination are on different lines!";
           dest.setCustomValidity(err);
         }
         document.getElementsByName("destination").forEach(
          (x) => x.addEventListener("change", validate_origin_destination)
         );
+
+       /* Also do it when the page loads, because firefox likes to
+        * remember your selection even after the page reloads. */
+        window.addEventListener("load", validate_origin_destination);
       }
 
     </script>