1var language = document.getElementsByTagName("html")[0].getAttribute("lang"); 2 3/** 4 * Check if the current portal matches the request 5 * @param {string} pos_code 6 * @returns {boolean} 7 */ 8var isPortal = (pos_code) => { 9 let r = false; 10 if (document.querySelector("html").classList.contains(pos_code)) { 11 r = true; 12 } 13 return r; 14}; 15/** 16 * Check if the current page matches the request 17 * @param {string} page_id 18 * @returns {boolean} 19 */ 20var isPage = (page_id) => { 21 let r = false; 22 if (document.querySelectorAll(page_id).length > 0) { 23 r = true; 24 } 25 return r; 26}; 27/** 28 * Check if current page has param 29 * @param {string} Href 30 * @returns {boolean} 31 */ 32var isHref = (Href) => { 33 let r = false; 34 if (window.location.href.includes(Href)) { 35 r = true; 36 } 37 return r; 38}; 39 40// Adapt menu cache v2 41function isMenu(retries = 50, delay = 100) { 42 return new Promise(resolve => { 43 if (!document.querySelector('#secondary_content_navigation')) { 44 return resolve(false); 45 } 46 47 function checkMenu(remaining) { 48 const menuItem = document.querySelector('ul[role="menu"] a[role="menuitem"]'); 49 if (menuItem) { 50 resolve(true); 51 } else if (remaining > 0) { 52 setTimeout(() => checkMenu(remaining - 1), delay); 53 } else { 54 console.warn("Menu didn't load"); 55 resolve(false); 56 } 57 } 58 59 checkMenu(retries); 60 }); 61} 62 63if (typeof jQuery !== "undefined") { 64 $(document).ready(function () { 65 // 00276199 - Redirect /list/events to /content 66 try { 67 var currentURL = window.location.href; 68 if (currentURL.includes("/list/events") || currentURL.includes("/list/seasonTickets")) { 69 window.location.href = "https://billetterie.abrugby.fr/content"; 70 } 71 } catch (err) { 72 console.log("Customize JS failed 00276199"); 73 console.log(err); 74 } 75 // 00276199 END 76 77 // 00305901 + FIX by ZAS 78 try { 79 if ($("#page_account_file #file_installments").length > 0 && $("#file_additional_payment_info .file_payment_mode").html().includes("SEPA")) { 80 $("#page_account_file #file_installments td.installment_payment_date").html("-"); 81 } 82 } catch (error) { 83 console.log("Failed custom 00305901"); 84 console.log(error); 85 } 86 // END 00305901 87 88 // 00316029 89 try { 90 if ($('html[lang="fr"]').length > 0) { 91 $(".tickets_menu_add_products a").html("Liste des matchs"); 92 $(".last_menu_product_category .nav_title").html("Liste des matchs"); 93 } 94 } catch (err) { 95 console.log("Customize JS failed"); 96 console.log(err); 97 } 98 // 00316029 - END 99 }); 100} 101 102// 00316513 103if (typeof jQuery !== "undefined") { 104 $(document).ready(function () { 105 try { 106 // Hide the March 30, 2024 performance in the Tickets page 107 let ticketPerformances = []; 108 let dateArray = $("#page_account_tickets .composed_product .date-time-location .date"); 109 for (let i = 0; i < dateArray.length; i++) { 110 if (dateArray[i].textContent.trim().includes("Saturday, 30 March 2024") || dateArray[i].textContent.trim().includes("samedi 30 mars 2024") || dateArray[i].textContent.trim().includes("sábado 30 marzo 2024") || dateArray[i].textContent.trim().includes("30.03.2024")) { 111 ticketPerformances = [dateArray[i], ...ticketPerformances]; 112 } 113 } 114 let composedProductArr = $("#page_account_tickets .composed_product"); 115 for (let i = 0; i < composedProductArr.length; i++) { 116 for (let k = 0; k < ticketPerformances.length; k++) { 117 if (composedProductArr[i].contains(ticketPerformances[k])) { 118 composedProductArr[i].setAttribute("style", "display: none"); 119 } 120 } 121 } 122 123 // Hide the March 30, 2024 performance in the access Order history page 124 if ($("#page_account_file .product_SEASONTICKET #prod_10229116383838").length > 0 || $("#page_account_file .product_SEASONTICKET #prod_10229115070333").length > 0) { 125 // get section products container 126 let prodContainer = $(".product_container.product_SPORTING_EVENT"); 127 128 // get performances have day of month are 30 129 let dayOfMonth = $("#page_account_file .product_SEASONTICKET .perf_details .day_of_month"); 130 let dayThirtyParents = []; 131 for (let i = 0; i < dayOfMonth.length; i++) { 132 if (dayOfMonth[i].textContent == "30") { 133 dayThirtyParents = [dayOfMonth[i].parentNode, ...dayThirtyParents]; 134 } 135 } 136
137 // get performances have month = March 138 let monthArr = $("#page_account_file .product_SEASONTICKET .perf_details .month_hour .month"); 139 let marMonths = []; 140 for (let j = 0; j < monthArr.length; j++) { 141 if (monthArr[j].textContent == "Mar" || monthArr[j].textContent == "mar" || monthArr[j].textContent == "mars") { 142 marMonths = [monthArr[j], ...marMonths]; 143 } 144 } 145 146 // get performances on March 30 147 let thirtyMarArr = []; 148 for (let k = 0; k < dayThirtyParents.length; k++) { 149 for (let l = 0; l < marMonths.length; l++) { 150 if (dayThirtyParents[k].contains(marMonths[l])) { 151 thirtyMarArr = [dayThirtyParents[k], ...thirtyMarArr]; 152 } 153 } 154 } 155 156 // hide performances on March 30 157 for (let i = 0; i < prodContainer.length; i++) { 158 for (let j = 0; j < thirtyMarArr.length; j++) { 159 if (prodContainer[i].contains(thirtyMarArr[j])) { 160 prodContainer[i].setAttribute("style", "display: none"); 161 } 162 } 163 } 164 } 165 166 // Hide the March 30, 2024 performance in the access Distribution page 167 let distributePerformances = []; 168 let perfArray = $("#page_account_distribution_eventTicketsDistributionDetails .title .performance-date"); 169 for (let i = 0; i < perfArray.length; i++) { 170 if (perfArray[i].textContent.trim().includes("Saturday, 30 March 2024") || perfArray[i].textContent.trim().includes("samedi 30 mars 2024") || perfArray[i].textContent.trim().includes("sábado 30 marzo 2024") || perfArray[i].textContent.trim().includes("30.03.2024")) { 171 distributePerformances = [perfArray[i], ...distributePerformances]; 172 } 173 } 174 let distributionPerf = $("#page_account_distribution_eventTicketsDistributionDetails .distribution_perf_line"); 175 for (let i = 0; i < distributionPerf.length; i++) { 176 for (let j = 0; j < distributePerformances.length; j++) { 177 if (distributionPerf[i].contains(distributePerformances[j])) { 178 distributionPerf[i].setAttribute("style", "display: none"); 179 } 180 } 181 } 182 } catch (err) { 183 console.log("Custom JS failed"); 184 console.log(err); 185 } 186 }); 187} 188// END 00316513 189 190// 00318342 191if (typeof jQuery === "undefined") { 192 try { 193 function expandNavBar() { 194 // Hide group list 195 var groupList = document.querySelectorAll(".groupList"); 196 var groupTitle = document.querySelectorAll(".groupTitle"); 197 for (var i = 0; i < groupList.length; i++) { 198 groupList[i].closest("div").classList.add("hidden"); 199 } 200 // Add click event to expand group list 201 for (var i = 0; i < groupTitle.length; i++) { 202 if (i !== 2 && i !== 4) { 203 groupTitle[i].closest("a").setAttribute("href", "#"); 204 groupTitle[i].insertAdjacentHTML( 205 "beforeend", 206 `<svg class="close_arw_mobile" style="font-size: 1rem; width: 1em; height: 1em;" focusable="false" aria-hidden="true" viewBox="0 0 24 20" data-testid="ExpandMoreIcon"> 207 <path d="m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"></path> 208 </svg>`, 209 ); 210 let groupNumber = groupTitle[i].classList[1]; 211 groupTitle[i].addEventListener("click", function () { 212 this.querySelector(".close_arw_mobile").classList.toggle("open"); 213 for (var k = 0; i < groupList.length; k++) { 214 if (groupList[k].classList.contains(groupNumber)) { 215 groupList[k].closest("div").classList.toggle("hidden"); 216 } 217 } 218 }); 219 } 220 } 221 } 222 var target = document.querySelector("body"); 223 var observer = new MutationObserver(function () { 224 let tsMobileMenu = document.querySelector("#ts-MobileMenu"); 225 if (tsMobileMenu && !tsMobileMenu.classList.contains("checked")) { 226 tsMobileMenu.classList.add("checked"); 227 tsMobileMenu.addEventlistener("click", expandNavBar()); 228 } 229 }); 230 // Add observer to selected element 231 observer.observe(target, { 232 childList: true, 233 subtree: true, 234 }); 235 } catch (err) { 236 console.log("Customize JS failed"); 237 console.log(err); 238 } 239} 240if (typeof jQuery !== "undefined") { 241 $(document).ready(function () { 242 try { 243 function expandNavBar() { 244 // Hide groupList 245 var groupList = document.querySelectorAll(".groupList"); 246 var groupTitle = document.querySelectorAll(".groupTitle"); 247 for (var i = 0; i < groupList.length; i++) { 248 groupList[i].closest("li").classList.add("hidden"); 249 } 250 // Add click event to expand group list 251 for (var i = 0; i < groupTitle.length; i++) { 252 if (i !== 2 && i !== 4) { 253 groupTitle[i].closest("a").setAttribute("href", "#"); 254 groupTitle[i].insertAdjacentHTML( 255 "beforeend", 256 `<svg class="close_arw_mobile" style="font-size: 1.5rem; width: 1em; height: 1em; fill: #fff;" focusable="false" aria-hidden="true" viewBox="0 0 24 20" data-testid="ExpandMoreIcon"> 257 <path d="m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58
257L18 14z"></path> 258 </svg>`, 259 ); 260 let groupNumber = groupTitle[i].classList[1]; 261 groupTitle[i].addEventListener("click", function () { 262 this.querySelector(".close_arw_mobile").classList.toggle("open"); 263 for (var k = 0; i < groupList.length; k++) { 264 if (groupList[k].classList.contains(groupNumber)) { 265 groupList[k].closest("li").classList.toggle("hidden"); 266 } 267 } 268 }); 269 } 270 } 271 } 272 expandNavBar(); 273 } catch (err) { 274 console.log("Customize JS failed"); 275 console.log(err); 276 } 277 }); 278} 279// 00318342 - END 280 281// 00318766 282if (typeof jQuery !== "undefined") { 283 $(document).ready(function () { 284 try { 285 if ($('html[lang = "es"]').length > 0) { 286 $(".tickets_menu_add_products a").eq(0).text("Lista de partidos"); 287 } else if ($('html[lang = "en"]').length > 0) { 288 $(".tickets_menu_add_products a").eq(0).text("Match List"); 289 } 290 } catch (err) { 291 console.log("Customize JS failed"); 292 console.log(err); 293 } 294 }); 295} 296// 00318766 - END 297 298// 00325819 - Hide print buttons for all events have host team ABMATCH A CONFIRMER, subscription product and SSTK Abonnement 24/25 CHEQUIER 299if (typeof jQuery !== "undefined") { 300 $(document).ready(function () { 301 try { 302 if ($("#page_account_tickets").length > 0) { 303 $('#page_account_tickets .product_right_img .title:contains("ABMATCH A CONFIRMER")').each(function () { 304 $(this).closest(".product_right_img.product_EVENT").nextAll(".seat_category_container").addClass("toBeHiddenButton"); 305 $(".toBeHiddenButton .print_options").remove(); 306 // Check if product_container has ABMATCH A CONFIRMER 307 $(this).closest(".product_container").addClass("toBeHidden"); 308 }); 309 } else if ($("#page_account_file").length > 0) { 310 $('#page_account_file .team.home .name:contains("ABMATCH A CONFIRMER")').each(function () { 311 $(this).closest(".product_container").addClass("toBeHidden"); 312 $(".toBeHidden .print_actions").remove(); 313 $(this).closest("#main_content_container").addClass("toBeHidden2"); 314 $(".toBeHidden2 .massPrintingWidget").remove(); 315 }); 316 } else if ($("#page_account_seasontickets_fixedPriceDetail").length > 0) { 317 $('#page_account_seasontickets_fixedPriceDetail .team.home .name:contains("ABMATCH A CONFIRMER")').each(function () { 318 $(this).closest("#main_content_container").addClass("toBeHidden"); 319 $(".toBeHidden .print_actions").remove(); 320 }); 321 } 322 } catch (err) { 323 console.log("Customize JS failed"); 324 console.log(err); 325 } 326 }); 327} 328// 00325819 - END 329 330// 00326392 331if (typeof jQuery !== "undefined") { 332 $(document).ready(function () { 333 try { 334 var lang = document.getElementsByTagName("html")[0].getAttribute("lang"); 335 // Hide word "From" in timeslotpass_date_chooser in page_selection_item 336 if ($("#page_selection_item").length > 0 && $(".product_VISIT_PASS").length > 0) { 337 if (lang === "en") { 338 $("#timeslotpass_date_chooser .timeslot_from_price .from").html($(".timeslot_from_price .from").html().replace("From", "")); 339 } else if (lang === "fr") { 340 $("#timeslotpass_date_chooser .timeslot_from_price .from").html($(".timeslot_from_price .from").html().replace("Ã partir de", "")); 341 } else if (lang === "es") {
342 $("#timeslotpass_date_chooser .timeslot_from_price .from").html($(".timeslot_from_price .from").html().replace("desde", "")); 343 } 344 345 $("#page_selection_item .amount.amount_EUR .int_part").each(function () { 346 if ($(this).text() === "0") { 347 $(this).closest(".timeslot_from_price").addClass("toBeHidden"); 348 $("#page_selection_item .toBeHidden").css("display", "none"); 349 } 350 }); 351 } 352 353 // Hide word "Master" in title in page_account_tickets 354 if ($("#page_account_tickets").length > 0) { 355 $('#page_account_tickets .product_right_img .title:contains("Master -")').each(function () { 356 $(this).html($(this).html().replace("Master -", "")); 357 }); 358 } 359 } catch (err) { 360 console.log("Customize JS failed"); 361 console.log(err); 362 } 363 }); 364} 365// 00326392 END 366 367// 00326599 - Hide reprint, transfer and distribute button for SSTK ABO_FULL on file detail page 368if (typeof jQuery !== "undefined") { 369 $(document).ready(function () { 370 try { 371 if ($("#page_account_file").length > 0) { 372 $('#page_account_file .title:contains("Abonnements 2024/2025")').each(function () { 373 $(this).closest(".product_container").addClass("ABO_FULL_SSTK"); 374 $(".ABO_FULL_SSTK .product_container").each(function () { 375 $(this).addClass("toBeHidden"); 376 $(".toBeHidden .print_actions").remove(); 377 }); 378 $(this).closest("#main_content_container").addClass("toBeHidden2"); 379 $(".toBeHidden2 #main_content_file_summary .distribute_button").remove(); 380 }); 381 } 382 } catch (err) { 383 console.log("Customize JS failed"); 384 console.log(err); 385 } 386 }); 387} 388// 00326599 END 389 390// 00326825 - Customizations are only applied for service product code 10229241912020 391if (typeof jQuery !== "undefined") { 392 $(document).ready(function () { 393 try { 394 var lang = document.getElementsByTagName("html")[0].getAttribute("lang"); 395 if ($(".page_container #prod_10229241912020").length > 0 || $(".page_container #prod_10229241912021").length > 0) { 396 // Hide 0 price 397 $(".amount.amount_EUR .int_part").each(function () { 398 if ($(this).text() === "0") { 399 $(this).closest(".amount.amount_EUR").addClass("toBeHidden"); 400 $(".toBeHidden").css("display", "none"); 401 } 402 }); 403 404 if (lang == "fr") { 405 // Change text of buy button in page cart reservation for desktop and mobile 406 $("#page_cart_reservation:has(#prod_10229241912020) .text.for_non_mobile").html("Sâinscrire maintenant"); 407 $("#page_cart_reservation:has(#prod_10229241912020) .text.for_mobile_only").html("Sâinscrire maintenant"); 408 409 $("#page_cart_reservation:has(#prod_10229241912021) .text.for_non_mobile").html("Sâinscrire maintenant"); 410 $("#page_cart_reservation:has(#prod_10229241912021) .text.for_mobile_only").html("Sâinscrire maintenant"); 411 412 // Add information on the top of the Summary page 413 $("#page_checkout_orderSummary:has(#prod_10229241912020) #content_container #content").before("<div class='confirmInformation'>Après avoir valider votre demande, votre inscription sur notre liste dâattente pour la saison 2024/2025 sera bien prise en compte. Veuillez noter que l'attribution des places n'est pas garantie. Nous vous recontacterons prochainement.</div>"); 414 415 $("#page_checkout_orderSummary:has(#prod_10229241912021) #content_container #content").before("<div class='confirmInformation'>Après avoir valider votre demande, votre inscription sur notre liste dâattente pour la saison 2024/2025 sera bien prise en compte. Veuillez noter que l'attribution des places n'est pas garantie. Nous vous recontacterons prochainement.</div>"); 416 } 417 } 418 } catch (err) { 419 console.log("Customize JS failed"); 420 console.log(err); 421 } 422 });
423} 424 425if (typeof jQuery === "undefined") { 426 try { 427 if (document.querySelector("#root")) { 428 var lang = document.getElementsByTagName("html")[0].getAttribute("lang"); 429 // Change text of button in content page for service product 430 var observer = new MutationObserver(function (mutations) { 431 if (document.querySelector(".stx-ProductCard-10229241912020") || document.querySelector(".stx-ProductCard-10229241912021")) { 432 setTimeout(function () { 433 if (lang == "fr") { 434 document.querySelector(".stx-ProductCard-10229241912020 .g-Button span").innerHTML = "Inscription"; 435 document.querySelector(".stx-ProductCard-10229241912021 .g-Button span").innerHTML = "Inscription"; 436 } 437 }, 200); 438 } 439 }); 440 observer.observe(document.querySelector("#root"), { 441 childList: true, 442 subtree: true, 443 }); 444 } 445 } catch (err) { 446 console.log("Customize JS failed"); 447 console.log(err); 448 } 449} 450// 00326825 END 451 452// 00329775 - Hide events have title "ABMATCH A CONFIRMER vs Stade Rochelais" on account/tickets and file detail pages 453if (typeof jQuery !== "undefined") { 454 $(document).ready(function () { 455 try { 456 if ($("#page_account_tickets").length > 0) { 457 $('#page_account_tickets .product_right_img .title:contains("ABMATCH A CONFIRMER vs Stade Rochelais")').each(function () { 458 $(this).closest(".composed_product").addClass("toBeHiddenMatch"); 459 $(".toBeHiddenMatch").css("display", "none"); 460 }); 461 } else if ($("#page_account_file").length > 0) { 462 // Class "tobeHidden" added in case 00325819, check if product has "ABMATCH A CONFIRMER" match 463 $('#page_account_file .toBeHidden .team.opposite .name:contains("Stade Rochelais")').each(function () { 464 $(this).closest(".product_container").addClass("toBeHiddenMatch"); 465 $(".toBeHiddenMatch").css("display", "none"); 466 }); 467 } 468 } catch (err) { 469 console.log("Customize JS failed"); 470 console.log(err); 471 } 472 }); 473} 474// 00329775 - END 475 476// 00331262/00355972 - Hide originalPrice, resalePrice, subtotal in resaleTicketTable and resale_summary_container only for match Day 20 - Aviron Bayonnais vs Stade Rochelais 477if (typeof jQuery !== "undefined") { 478 $(document).ready(function () { 479 try { 480 // Detect language and map "Day" text 481 const lang = document.documentElement.getAttribute("lang"); 482 const langMap = { en: "Day", fr: "Journée", es: "DÃa" }; 483 const translatedDay = langMap[lang] || "Day"; 484 485 // Define match titles to look for 486 const matchTitles = [`Saison 2025/2026 - ${translatedDay} 20 - Aviron Bayonnais vs Stade Rochelais`]; 487 488 // Hide elements on resell tickets page 489 function handleResellTicketsPage() {
490 matchTitles.forEach((title) => { 491 const $matchedTitles = $(`#page_account_resellTickets .product_right_img .title:contains("${title}")`); 492 if ($matchedTitles.length > 0) { 493 $matchedTitles.each(function () { 494 const $mainContainer = $(this).closest("#main_content_container"); 495 const $tableContainer = $(this).closest(".product_right_img.product_EVENT").nextAll(".table_container"); 496 497 $mainContainer.addClass("toBeHiddenMainContent"); 498 $mainContainer.find("#resale_summary_container").hide(); 499 $mainContainer.find("#resale_parameters").css("width", "100%"); 500 501 $tableContainer.addClass("toBeHiddenTable"); 502 $tableContainer.find(".resaleTicketTable .originalPrice, .resaleTicketTable .resalePrice, .resaleTicketTable .subtotal").hide(); 503 $tableContainer.find(".totalAllTicketsTable").hide(); 504 }); 505 } 506 }); 507 } 508 509 // Hide resale section on ticket resale page 510 function handleAccountTicketsPage() {
511 matchTitles.forEach((title) => { 512 const $matchedTitles = $(`#page_account_tickets .product_right_img .title:contains("${title}")`); 513 if ($matchedTitles.length > 0) { 514 $matchedTitles.each(function () { 515 const $productContainer = $(this).closest(".product_container"); 516 $productContainer.addClass("toBeHiddenContainer"); 517 $productContainer.find(".seat_category_container .ticket_additional_container_title").hide(); 518 }); 519 } 520 }); 521 } 522 523 // Execute appropriate function depending on page 524 if ($("#page_account_resellTickets").length > 0) { 525 handleResellTicketsPage(); 526 } 527 528 if (window.location.href.includes("account/tickets/resale")) { 529 handleAccountTicketsPage(); 530 } 531 } catch (err) { 532 console.error("Customize JS failed", err); 533 } 534 }); 535} 536// 00331262/00355972 END 537 538// 00334165 539if (typeof jQuery !== "undefined") { 540 $(document).ready(function () { 541 try { 542 const today = new Date(); 543 const endDate = new Date(2025, 0, 14, 0, 0, 0); // 14/01/2025 544 if (today < endDate) { 545 // Hide "ABMATCH A CONFIRMER vs MATCH 1" match on account/tickets and file detail page until 06/01/2025 3PM 546 if ($("#page_account_tickets").length > 0) { 547 $(".toBeHidden .title").each(function () { 548 if ($(this).html().includes("MATCH 1")) { 549 if ($(this).closest(".product_container .composed_product_container")) { 550 $(this).closest(".product_container .composed_product_container .composed_product").addClass("MATCH1_COMPOSED_PRODUCT"); 551 } 552 if ($(this).closest(".product_container:not(:has(.composed_product_container))")) { 553 $(this).closest(".product_container:not(:has(.composed_product_container))").addClass("MATCH1_EVENT"); 554 } 555 } 556 }); 557 $(".toBeHidden.MATCH1_EVENT").css("display", "none"); 558 $(".toBeHidden .MATCH1_COMPOSED_PRODUCT").css("display", "none"); 559 } else if ($("#page_account_file").length > 0) { 560 $(".toBeHidden .team.opposite .name:contains(MATCH 1)").each(function () { 561 $(this).closest(".toBeHidden").addClass("MATCH1_EVENT"); 562 }); 563 $(".toBeHidden.MATCH1_EVENT").css("display", "none"); 564 } else if ($("#page_account_files").length > 0) { 565 // Hide the first "See details" button on account/files page 566 $(".button.file_details").eq(0).css("display", "none"); 567 } else if ($("#page_account_home").length > 0) { 568 // Hide the "See details" button on account page 569 $("#page_account_home #main_content_account_home_last_file .button.file_details").eq(0).css("display", "none"); 570 } 571 } else { 572 // // Hide "ABMATCH A CONFIRMER vs Section Paloise" match on account/tickets and file detail page after 14/01/2025 573 if ($("#page_account_tickets").length > 0) { 574 $(".toBeHidden .title").each(function () { 575 if ($(this).html().includes("Section Paloise")) { 576 if ($(this).closest(".product_container:has(.product_COMPOSED_PRODUCT)")) { 577 $(this).closest(".composed_product").addClass("Section_Paloise_COMPOSED_PRODUCT"); 578 } 579 } 580 }); 581 $(".toBeHidden .Section_Paloise_COMPOSED_PRODUCT").css("display", "none"); 582 } else if ($("#page_account_file").length > 0) { 583 $(".toBeHidden .team.opposite .name:contains(Section Paloise)").each(function () { 584 $(this).closest(".toBeHidden").addClass("Section_Paloise_COMPOSED_PRODUCT"); 585 }); 586 $(".toBeHidden.Section_Paloise_COMPOSED_PRODUCT").css("display", "none"); 587 } 588 } 589 } catch (err) { 590 console.log("Customize JS failed"); 591 console.log(err); 592 } 593 });
594} 595// 00334165 END 596 597// 00355468 598if (typeof jQuery !== "undefined") { 599 $(document).ready(function () { 600 try { 601 // Hide "Aviron Bayonnais vs Stade Rochelais" match in season ticket ABONNEMENT_2526 product on account/tickets 602 if ($("#page_account_tickets").length > 0) { 603 $(".product_container .product_COMPOSED_PRODUCT .title:contains('ABONNEMENTS 2025/2026')").each(function () { 604 $(this).closest(".product_container").addClass("ABONNEMENT_2526"); 605 }); 606 607 $('#page_account_tickets .ABONNEMENT_2526 .product_right_img .title:contains("Aviron Bayonnais vs Stade Rochelais")').each(function () { 608 $(this).closest(".composed_product").addClass("toBeHiddenMatch"); 609 $(".toBeHiddenMatch").css("display", "none"); 610 }); 611 612 // Hide "Aviron Bayonnais vs Stade Rochelais" match in season ticket ABONNEMENT_2526 product on file detail page 613 } else if ($("#page_account_file").length > 0) { 614 $('#page_account_file .product_title_container .title:contains("ABONNEMENTS 2025/2026")').each(function () { 615 $(this).closest(".product_container.product_SEASONTICKET").addClass("ABONNEMENT_2526"); 616 }); 617 618 $('#page_account_file .ABONNEMENT_2526 .team.home .name:contains("Aviron Bayonnais")').each(function () { 619 $(this).closest(".team.home").addClass("AvBteam"); 620 }); 621 622 $('#page_account_file .ABONNEMENT_2526:has(.AvBteam) .team.opposite .name:contains("Stade Rochelais")').each(function () { 623 $(this).closest(".product_container").addClass("toBeHiddenMatch"); 624 $(".toBeHiddenMatch").css("display", "none"); 625 }); 626 } else if ($("#page_account_seasontickets_fixedPriceDetail").length > 0) { 627 $('#page_account_seasontickets_fixedPriceDetail .main_title:contains("ABONNEMENTS 2025/2026")').each(function () { 628 $(this).closest("#main_content_container").addClass("ABONNEMENT_2526"); 629 }); 630 631 $('#page_account_seasontickets_fixedPriceDetail .ABONNEMENT_2526 .team.home .name:contains("Aviron Bayonnais")').each(function () { 632 $(this).closest(".team.home").addClass("AvBteam"); 633 }); 634 635 $('#page_account_seasontickets_fixedPriceDetail .ABONNEMENT_2526:has(.AvBteam) .team.opposite .name:contains("Stade Rochelais")').each(function () { 636 $(this).closest(".product_container").addClass("toBeHiddenMatch"); 637 $(".toBeHiddenMatch").css("display", "none"); 638 }); 639 } 640 } catch (err) { 641 console.log("Customize JS failed"); 642 console.log(err); 643 } 644 }); 645} 646// 00355468 END 647 648// 00358634 649try { 650 if (isPage('#page_account_tickets')) { 651 if (isPage('.product_right_img')) { 652 $('.product_right_img .title:contains("ABMATCH A CONFIRMER")').each(function(){ 653 $(this).closest('.product_right_img').parent().hide(); 654 if ($(this).closest('.product_right_img').parent().find('.print_options .print_button_container_for_expand_panel').length>0) { 655 $(this).closest('.product_right_img').parent().find('.print_options .print_button_container_for_expand_panel').remove(); 656 } 657 }) 658 } 659 } else if (isPage('#page_account_file')) { 660 if (isPage('.product_container')) { 661 $('.product_container .perf_details span:contains("ABMATCH A CONFIRMER")').each(function(){ 662 $(this).closest('.product_container').hide(); 663 $('.massPrintingWidget').hide(); 664 if ($(this).closest('.product_container').find('.print_actions .print_button_container_for_expand_panel').length>0) { 665 $(this).closest('.product_container').find('.print_actions .print_button_container_for_expand_panel').remove(); 666 } 667 }) 668 } 669 } else if (isPage("#page_account_seasontickets_fixedPriceDetail")) { 670 $(
671 '#page_account_seasontickets_fixedPriceDetail .team .name:contains("ABMATCH A CONFIRMER")', 672 ).each(function () { 673 $(this).closest(".product_container").hide(); 674 $(this).closest(".product_container").find(".print_actions").remove(); 675 }); 676 } 677} catch (err) { 678 console.log("00358634 failed", err); 679} 680 681// 00358655 682try { 683 if (isHref('/content')) { 684 functionReady(); 685 } 686 function loadImage(src) { 687 return new Promise((resolve, reject) => { 688 const img = new Image(); 689 img.onload = () => resolve(img); 690 img.onerror = () => reject(new Error(`Image doesn't exist or failed to load: ${src}`)); 691 img.src = src; 692 }); 693 } 694 695 async function areBothImagesValid(src1, src2) { 696 try { 697 await Promise.all([loadImage(src1), loadImage(src2)]); 698 return true; 699 } catch { 700 return false; 701 } 702 } 703 function functionReady() { 704 const hostname = window.location.hostname; 705 if(isPage('.stx-ProductBox .stx-ProductCardTitle')){ 706 document.querySelectorAll('.stx-ProductCardTitle').forEach(el => { 707 if (el.textContent.includes('VS') || el.textContent.includes('vs')) { 708 let text = el.textContent.trim(); 709 parts = text.split(/\s+vs\.?\s+/i); 710 let flagswrap = document.createElement('div'); 711 flagswrap.classList.add('match_logos'); 712 flagswrap.innerHTML = ` 713 <img class="hometeam" src="/custom/images/teams/${parts[0].toUpperCase()}.png" alt=""> 714 <img class="awayteam" src="/custom/images/teams/${parts[1].toUpperCase()}" alt="">`; 715 let parent = el.closest('.stx-ProductBox'); 716 areBothImagesValid(`${hostname}/custom/images/teams/${parts[0].toUpperCase()}.png`, `${hostname}/custom/images/teams/${parts[1].toUpperCase()}.png`).then((valid) => { 717 if (valid) { 718 parent.querySelector('.stx-ProductImage').append(flagswrap); 719 } else { 720 el.closest('.stx-ProductBox').querySelector('.stx-ProductImage .g-Figure').style.display = 'block'; 721 } 722 }); 723 724 el.innerHTML = el.innerText.replace(/ vs\.? /gi, '<span class="versus">VS</span>'); 725 el.classList.add('stx-matches'); 726 }else { 727 if (!el.closest('.stx-ProductBox').querySelector('.stx-matches')) { 728 el.closest('.stx-ProductBox').querySelector('.stx-ProductImage .g-Figure').style.display = 'block'; 729 el.style.marginTop = '45px'; 730 } 731 } 732 }) 733 734 // break time to a new line 735 document.querySelectorAll('.stx-ProductDate p>span').forEach(el => { 736 if (el.children.length > 0) return; 737 const text = el.textContent.trim(); 738 if (/\d{1,2}:\d{2}/.test(text)) { 739 el.innerHTML = text.replace(/,([^,]*)$/, '<br>$1'); 740 } 741 }); 742 }else{ 743 setTimeout(functionReady, 200); 744 } 745 } 746} catch (error) { 747 console.log('00358655',err); 748}
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.