PageSourceSearch

https://www.fgc.cat/wp-content/plugins/fgc_custom_plugin//js/buscador_billetes.min.js?ver=1.2

js fgc.cat collected 2026-09-24 09:00:54 UTC 4,804 bytes, 1 lines download raw bytes

1function setBuscadorLineasEvents(){console.log("setBuscadorLineasEvents()"),jQuery("#liniasel").change(function(){switch(FGC.lineaSeleccionada=jQuery(this).val(),jQuery("#estacioOrigen option:eq(0)").attr("selected","selected"),jQuery("#estacioDesti option:eq(0)").attr("selected","selected"),FGC.lineaSeleccionada){case"1":recargarEstacions(FGC.lineaSeleccionada=1);break;case"2":case"99":recargarEstacions(FGC.lineaSeleccionada=2);break;case"4":recargarEstacions(FGC.lineaSeleccionada=4);break;case"3":FGC.lineaSeleccionada=0,window.open("https://www.fgc.cat/xarxa-fgc/linea-lleida-lapobla/"),recargarEstacions();break;case"5":FGC.lineaSeleccionada=0,window.open("https://www.valldenuria.cat/website_valldenuria/cat/cremallera.asp"),recargarEstacions();default:FGC.lineaSeleccionada=0,recargarEstacions()}}),jQuery("#estacioOrigen").change(function(){var e=queLiniaEs(jQuery(this).val());FGC.lineaSeleccionada!==e&&(FGC.lineaSeleccionada=e,refreshLineaSeleccionada(),jQuery("#estacioDesti option:eq(0)").attr("selected","selected"))}),jQuery("#estacioDesti").change(function(){var e=queLiniaEs(jQuery(this).val());FGC.lineaSeleccionada!==e&&(FGC.lineaSeleccionada=e,refreshLineaSeleccionada(),jQuery("#estacioOrigen option:eq(0)").attr("selected","selected"))})}function queLiniaEs(e){if("MO"==e)return 2;for(var a in FGC.linesAndStations)if(0<a&&void 0!==FGC.linesAndStations[a]&&void 0!==FGC.linesAndStations[a][e])return parseInt(a);return console.log("queLiniaEs: No existe la linea para "+e),-1}function recargarSelect(e,a){var i,s=jQuery(e).val(),n=jQuery(e).children()[0];for(i in jQuery(e).empty(),jQuery(e).append(n),a)jQuery(e).append('<option value="'+i+'">'+a[i]+"</option>");jQuery(e).val(s)}function recargarEstacions(e){switch(e){case 1:recargarSelect("#estacioOrigen",FGC.linesAndStations[1]),recargarSelect("#estacioDesti",FGC.linesAndStations[1]),void 0!==jQuery(".encabezado_plano")&&(jQuery(".encabezado_plano").show(),jQuery(".lineabarcelonavalles").show(),jQuery(".lineallobregatanoia").hide());break;case 2:recargarSelect("#estacioOrigen",FGC.linesAndStations[2]),recargarSelect("#estacioDesti",FGC.linesAndStations[2]),void 0!==jQuery(".encabezado_plano")&&(jQuery(".encabezado_plano").show(),jQuery(".lineabarcelonavalles").hide(),jQuery(".lineallobregatanoia").show());break;case 4:recargarSelect("#estacioOrigen",FGC.linesAndStations[4]),recargarSelect("#estacioDesti",FGC.linesAndStations[4]),void 0!==jQuery(".encabezado_plano")&&(jQuery(".encabezado_plano").show(),jQuery(".lineabarcelonavalles").hide(),jQuery(".lineallobregatanoia").show());break;default:recargarSelect("#estacioOrigen",FGC.linesAndStations[0]),recargarSelect("#estacioDesti",FGC.linesAndStations[0]),jQuery("#liniasel option:eq(0)").attr("selected","selected"),void 0!==jQuery(".encabezado_plano")&&(jQuery(".encabezado_plano").hide(),jQuery(".lineabarcelonavalles").hide(),jQuery(".lineallobregatanoia").hide())}}function refreshLineaSeleccionada(){jQuery("#liniasel option").removeProp("selected"),jQuery("#liniasel option:eq("+FGC.lineaSeleccionada+")").prop("selected","selected"),recargarEstacions(FGC.lineaSeleccionada)}function buscadorBilletesShowPrices(){console.log("buscadorBilletesShowPrices()");var e=Object.keys(FGC.searchResult.Prices).length;jQuery("#content_billets_1 .wpb_wrapper").empty();var a=jQuery("#billets_filter").val(),i="";1==a?i="FM|FN|nombrosa|Pensionista|Discapacitat":2==a?i="FM|FN|nombrosa":3==a?i="Pensionista":4==a&&(i="Discapacitat");for(var s=0;s<e;s++){var n=FGC.searchResult.Prices[s].Name,r=FGC.searchResult.Prices[s].Zones,l=FGC.searchResult.Prices[s].Price.replace(".",","),t=new RegExp(i,"i").test(n);1==a&&(t=!t),""!=i&&!t||jQuery("#content_billets_1 .wpb_wrapper").append("<div class='billets'><div class='billets_row'><div class='billets_zone'>ZONA "+r+"</div> <div class='billets_name'>"+n+"</div><div class='billets_price'>"+l+" €</div></div></div>")}var o=0;jQuery(".billets").each(function(e){9<o&&jQuery(this).hide(),o++}),o<=9?jQuery("#billets_show_more").hide():jQuery("#billets_show_more").show()}function buscadorBilletesShowAll(){jQuery(".billets").each(function(e){jQuery(this).show()}),jQuery("#billets_show_more").hide()}jQuery(document).ready(function(){jQuery("#header_billets").hide(),jQuery("#billets_show_more").hide(),FGC.isSearch&&(FGC.estacionOrigen===FGC.estacionDestino?alert("L'estació d'origen i destinació són les mateixes!"):(jQuery("#header_billets").show(),jQuery("#billets_show_more").show(),buscadorBilletesShowPrices(),jQuery("#billets_filter").change(function(){buscadorBilletesShowPrices()}),jQuery("#billets_mostar").click(function(){buscadorBilletesShowAll()}),jQuery("html, body").animate({scrollTop:jQuery("#header_billets").offset().top},2e3))),setBuscadorLineasEvents()}),console.log("buscador_billetes.js OK");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.