@@ -530,7 +530,7 @@ function init() {
530530 } ) ;
531531 }
532532
533- // No idea why this is needed, but FF3 disables random buttons without it...
533+ // No idea why this was needed originally; but FF3 disables random buttons without it...
534534 for ( var i = 0 ; i < document . forms [ "inputform" ] . elements . length ; i ++ ) {
535535 document . forms [ "inputform" ] . elements [ i ] . disabled = false ;
536536 }
@@ -860,7 +860,7 @@ function onAirportSelect(airport) {
860860 // 2. system is in "demo mode", or
861861 // 3. privacy is set to (O)pen
862862 if ( logged_in || demo_mode || privacy == "O" ) {
863- // Get list of user flights
863+ // Get a list of user flights
864864 desc +=
865865 " <a href='#' onclick='JavaScript:xmlhttpPost(\"" +
866866 URL_FLIGHTS +
@@ -983,6 +983,11 @@ function onAirportUnselect(airport) {
983983 // do nothing
984984}
985985
986+ /**
987+ * @param strURL
988+ * @param id
989+ * @param param
990+ */
986991function xmlhttpPost ( strURL , id , param ) {
987992 var self = this ;
988993 var query = "" ;
@@ -991,14 +996,8 @@ function xmlhttpPost(strURL, id, param) {
991996 closeNews ( ) ;
992997 }
993998
994- // Mozilla/Safari
995- if ( window . XMLHttpRequest ) {
996- self . xmlHttpReq = new XMLHttpRequest ( ) ;
997- }
998- // IE
999- else if ( window . ActiveXObject ) {
1000- self . xmlHttpReq = new ActiveXObject ( "Microsoft.XMLHTTP" ) ;
1001- }
999+ // Won't support ancient IE. Chances are they can't load the site anyway...
1000+ self . xmlHttpReq = new XMLHttpRequest ( ) ;
10021001 self . xmlHttpReq . open ( "POST" , strURL , true ) ;
10031002 self . xmlHttpReq . setRequestHeader (
10041003 "Content-Type" ,
@@ -1283,7 +1282,7 @@ function xmlhttpPost(strURL, id, param) {
12831282 gt . gettext (
12841283 "'%1' not found in %2 database. Do you want to add it as a new %2 company?"
12851284 ) ,
1286- [ airline , modeoperators [ mode ] , modeoperators [ mode ] ]
1285+ [ airline , modeoperators [ mode ] ]
12871286 )
12881287 )
12891288 ) {
@@ -1611,7 +1610,9 @@ function updateFilter(str) {
16111610 ) ;
16121611}
16131612
1614- // Generate title for current map
1613+ /**
1614+ * Generate title for current map
1615+ */
16151616function getMapTitle ( closable ) {
16161617 var form = document . forms [ "filterform" ] ;
16171618 var text = "" ;
@@ -1661,7 +1662,7 @@ function getMapTitle(closable) {
16611662 text = gt . gettext ( "Recently added flights" ) ;
16621663 }
16631664 } else {
1664- // Viewing another's profile
1665+ // Viewing another user 's profile
16651666 if ( trid != "0" ) {
16661667 text = tripname + ' <a href="' + tripurl + '">\u2197</a>' ;
16671668 } else {
@@ -1858,7 +1859,9 @@ function cloneSelect(oldSelect, name, hook, selected) {
18581859 return newSelect ;
18591860}
18601861
1861- // Return value of the currently selected radio button in this group
1862+ /**
1863+ * Return value of the currently selected radio button in this group
1864+ */
18621865function radioValue ( radio ) {
18631866 for ( var r = 0 ; r < radio . length ; r ++ ) {
18641867 if ( radio [ r ] . checked ) {
@@ -2092,6 +2095,11 @@ function startListFlights() {
20922095 xmlhttpPost ( URL_FLIGHTS , 0 , "MAP" ) ;
20932096}
20942097
2098+ /**
2099+ * @param str
2100+ * @param desc
2101+ * @param id
2102+ */
20952103function listFlights ( str , desc , id ) {
20962104 openPane ( "result" ) ;
20972105 fidList = [ ] ;
@@ -2106,7 +2114,6 @@ function listFlights(str, desc, id) {
21062114
21072115 var hasGCButton = false ;
21082116
2109- // IE string concat is painfully slow, so we use an array and join it instead
21102117 var table = [ ] ;
21112118 table . push (
21122119 // TODO: alt text
@@ -3858,7 +3865,7 @@ function selectAirport(apid, select, quick, code) {
38583865}
38593866
38603867/**
3861- * Change number of rows displayed in multiinput
3868+ * Change the number of rows displayed in multiinput
38623869 * @param type {string}
38633870 */
38643871function changeRows ( type ) {
@@ -4200,7 +4207,9 @@ function logout(str) {
42004207 document . forms [ "login" ] . name . focus ( ) ;
42014208}
42024209
4203- // Get current transport mode
4210+ /**
4211+ * Get current transport mode
4212+ */
42044213function getMode ( ) {
42054214 if ( getCurrentPane ( ) == "input" ) {
42064215 return document . forms [ "inputform" ] . mode . value ;
@@ -4516,7 +4525,7 @@ function showLoadingAnimation(show) {
45164525}
45174526
45184527/**
4519- * user has selected a new field in the extra filter
4528+ * User has selected a new field in the extra filter
45204529 */
45214530function setExtraFilter ( ) {
45224531 var key = document . forms [ "filterform" ] . Extra . value ,
0 commit comments