corporateleagues.com Review
corporateleagues.com Review
| Titletag | Descriptiontag | language |
|---|
| Corporate Basketball League (CBL) - Türkiye Basketbol Ligi | |
Turkish |
| Ip adress | 94.73.149.212 | Nameserver | ns2.natrohost.com ns1.natrohost.com |
Status code | 200 |
<!doctype html>
<html lang="tr">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#17295a" />
<!-- Primary Meta Tags -->
<title>Corporate Basketball League (CBL) - Türkiye Basketbol Ligi</title>
<meta name="title" content="Corporate Basketball League (CBL) - Türkiye Kurumsal Basketbol Ligi" />
<meta
name="description"
content="Corporate Basketball League (CBL) resmi web sitesi. Maç sonuçları, istatistikler, haberler, takım ve oyuncu bilgileri. Corporate Basketball League tüm bilgilerine erişin."
/>
<meta
name="keywords"
content="CBL, Corporate Basketball League, Kurumsal Basketbol Ligi, basketbol, maç sonuçları, istatistikler, basketbol haberleri, takımlar, oyuncular"
/>
<meta name="robots" content="index, follow" />
<meta name="language" content="Turkish" />
<meta name="author" content="Corporate Basketball League" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.corporateleagues.com/" />
<meta property="og:title" content="Corporate Basketball League (CBL) - Türkiye Kurumsal Basketbol Ligi" />
<meta
property="og:description"
content="Corporate Basketball League (CBL) resmi web sitesi. Maç sonuçları, istatistikler, haberler, takım ve oyuncu bilgileri."
/>
<meta property="og:image" content="https://www.corporateleagues.com/assets/image/tbf_header.png" />
<meta property="og:locale" content="tr_TR" />
<meta property="og:site_name" content="Corporate Basketball League" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://www.corporateleagues.com/" />
<meta property="twitter:title" content="Corporate Basketball League (CBL)" />
<meta
property="twitter:description"
content="Corporate Basketball League (CBL) resmi web sitesi. Maç sonuçları, istatistikler, haberler, takım ve oyuncu bilgileri."
/>
<meta property="twitter:image" content="https://www.corporateleagues.com/assets/image/tbf_header.png" />
<!-- Canonical -->
<link rel="canonical" href="https://www.corporateleagues.com/" />
<!-- Preconnect to external domains -->
<link rel="preconnect" href="https://elfsightcdn.com" />
<link rel="dns-prefetch" href="https://elfsightcdn.com" />
<link rel="preconnect" href="https://yechef.com" />
<link rel="dns-prefetch" href="https://yechef.com" />
<!-- Elfsight Instagram Widget -->
<!-- Elfsight YouTube Gallery | Untitled YouTube Gallery -->
<script src="https://elfsightcdn.com/platform.js" async defer></script>
<!--
Local dev CORS workaround:
- Yalnızca Node dev-server (localhost:4173/4174) üzerinde devreye girer.
- https://cbladmin.com/... => /... (proxy için)
Not: İzmir artık bundle içinde native destekleniyor; override gerekmez.
-->
<script>
(function () {
"use strict";
var host = (window.location && window.location.hostname) || "";
var port = (window.location && window.location.port) || "";
var isDevProxy = (host === "localhost" || host === "127.0.0.1") && (port === "4173" || port === "4174");
var REWRITE_ORIGINS = ["https://cbladmin.com"]; // keep minimal & explicit
function rewriteUrl(url) {
try {
if (!url) return url;
var u = url;
// 1) Localhost dev-server: absolute => relative
if (isDevProxy && typeof u === "string") {
for (var i = 0; i < REWRITE_ORIGINS.length; i++) {
var origin = REWRITE_ORIGINS[i];
if (u.indexOf(origin) === 0) {
u = u.slice(origin.length) || "/";
break;
}
}
}
return u;
} catch (e) {
return url;
}
}
// Patch fetch
if (window.fetch) {
var _fetch = window.fetch;
window.fetch = function (input, init) {
try {
if (typeof input === "string") {
input = rewriteUrl(input);
} else if (input && typeof input.url === "string") {
input = new Request(rewriteUrl(input.url), input);
}
} catch (e) {}
return _fetch.call(this, input, init);
};
}
// Patch XHR (axios default)
if (window.XMLHttpRequest && window.XMLHttpRequest.prototype) {
var _open = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function (method, url) {
return _open.call(this, method, rewriteUrl(url));
};
}
})();
</script>
<script type="module" crossorigin src="/assets/index-D2z8kNw1.js"></script>
<link rel="modulepreload" crossorigin href="/assets/react-vendor-Cs_TF7oq.js" />
<link rel="modulepreload" crossorigin href="/assets/query-vendor-DFADvyFz.js" />
<link rel="modulepreload" crossorigin href="/assets/ui-vendor-Cm5kJ0en.js" />
<link rel="stylesheet" crossorigin href="/assets/index-DuS5_-lq.css" />
</head>
<body>
<div id="root"></div>
<!--
Build (source) erişimi olmadan, "Puan Durumu" kartındaki "Diğer Seriler" listesini
Seri D/E/F başlıkları altında gruplamak için küçük bir DOM düzeltmesi.
-->
<script>
(function () {
"use strict";
var SERIES = [
{ label: "D", groups: ["O", "Ö", "P"] },
{ label: "E", groups: ["R", "S", "Ş", "T"] },
{ label: "F", groups: ["U", "Ü", "V", "Y"] },
];
function isIzmirPage() {
var p = (window.location && window.location.pathname) || "/";
return p === "/izmir" || p.indexOf("/izmir/") === 0;
}
function textOf(el) {
return (el && el.textContent ? el.textContent : "").trim();
}
function findPuanDurumuCards() {
var headings = Array.prototype.slice
.call(document.querySelectorAll("h2"))
.filter(function (h) {
return textOf(h) === "Puan Durumu";
});
return headings
.map(function (h) {
return h.closest("section") || h.closest("div");
})
.filter(Boolean);
}
function removeInjectedHeaders(card) {
var existing = card.querySelectorAll("[data-series-header]");
for (var i = 0; i < existing.length; i++) existing[i].remove();
}
function applyIzmirGroupA(card) {
if (!isIzmirPage()) return;
var buttons = card.querySelectorAll("button");
var seriABtn = null;
var seriBBtn = null;
function normText(s) {
return (s || "").replace(/\s+/g, " ").trim();
}
for (var i = 0; i < buttons.length; i++) {
var b = buttons[i];
if (!b || !b.textContent) continue;
var t = normText(b.textContent);
if (!seriABtn && /^Seri\s*A$/i.test(t)) seriABtn = b;
if (!seriBBtn && /^Seri\s*B$/i.test(t)) seriBBtn = b;
if (seriABtn && seriBBtn) break;
}
if (seriABtn) {
seriABtn.textContent = "Grup A";
}
if (seriBBtn) {
if (seriABtn) {
if (seriBBtn.parentNode) seriBBtn.parentNode.removeChild(seriBBtn);
} else {
seriBBtn.textContent = "Grup A";
}
}
// Remove inner list header "Grup A" (only in Izmir)
var list = card.querySelector("div.divide-y.divide-gray-200");
if (!list) return;
var listNodes = list.querySelectorAll("div, span, p, h3, h4");
for (var j = 0; j < listNodes.length; j++) {
var ln = listNodes[j];
if (!ln || !ln.textContent) continue;
if (ln.children && ln.children.length) continue;
var t = textOf(ln);
if (t !== "Grup A" && t !== "Seri A") continue;
var direct = ln.parentNode === list ? ln : null;
var block = direct || (ln.closest && ln.closest("div"));
if (block && block.parentNode) {
block.parentNode.removeChild(block);
} else if (ln.parentNode) {
ln.parentNode.removeChild(ln);
}
break;
}
}
function applyToCard(card) {
applyIzmirGroupA(card);
var buttons = card.querySelectorAll("button");
var otherBtn = null;
for (var i = 0; i < buttons.length; i++) {
if (textOf(buttons[i]) === "Diğer Seriler") {
otherBtn = buttons[i];
break;
}
}
if (!otherBtn) return;
var cn = otherBtn.className || "";
var isOthersActive = cn.indexOf("bg-white") !== -1 && cn.indexOf("text-orange-600") !== -1;
if (!isOthersActive) {
removeInjectedHeaders(card);
return;
}
var list = card.querySelector("div.divide-y.divide-gray-200");
if (!list) return;
removeInjectedHeaders(card);
function normKey(k) {
try {
return (k || "").trim().normalize ? (k || "").trim().normalize("NFC") : (k || "").trim();
} catch (e) {
return (k || "").trim();
}
}
function makeSeriesHeader(label) {
var wrapper = document.createElement("div");
wrapper.setAttribute("data-series-header", label);
wrapper.className = "py-2";
var headerEl = document.createElement("div");
headerEl.className = "px-4 py-2 text-xs font-bold sticky top-0";
headerEl.style.cssText =
"background: linear-gradient(90deg, rgba(255, 247, 237, .92) 0%, rgba(255, 237, 213, .78) 55%, rgba(255, 255, 255, .80) 100%);" +
"color: #c2410c;" +
"letter-spacing: .06em;" +
"text-transform: uppercase;" +
"border-top: 1px solid rgba(251, 146, 60, .28);" +
"border-bottom: 1px solid rgba(251, 146, 60, .28);" +
"box-shadow: 0 10px 28px rgba(15, 23, 42, .04);";
headerEl.textContent = "Seri " + label;
wrapper.appendChild(headerEl);
return wrapper;
}
var groupBlockByLetter = new Map();
var blocksInDomOrder = [];
var children = list.children;
for (var j = 0; j < children.length; j++) {
var block = children[j];
if (!block || (block.getAttribute && block.getAttribute("data-series-header"))) continue;
blocksInDomOrder.push(block);
var header = block.querySelector("div");
if (!header) continue;
var m = textOf(header).match(/^Grup\s+(.+)$/);
if (m && m[1]) groupBlockByLetter.set(normKey(m[1]), block);
}
var frag = document.createDocumentFragment();
var used = new Set();
for (var si = 0; si < SERIES.length; si++) {
var series = SERIES[si];
var addedHeader = false;
for (var gi = 0; gi < series.groups.length; gi++) {
var key = normKey(series.groups[gi]);
var blk = groupBlockByLetter.get(key);
if (!blk) continue;
if (!addedHeader) {
frag.appendChild(makeSeriesHeader(series.label));
addedHeader = true;
}
used.add(blk);
frag.appendChild(blk);
}
}
for (var bi = 0; bi < blocksInDomOrder.length; bi++) {
var b = blocksInDomOrder[bi];
if (!used.has(b)) frag.appendChild(b);
}
list.textContent = "";
list.appendChild(frag);
}
var scheduled = false;
function schedule() {
if (scheduled) return;
scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
scheduled = false;
var cards = findPuanDurumuCards();
for (var i = 0; i < cards.length; i++) applyToCard(cards[i]);
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
window.addEventListener("popstate", schedule);
})();
</script>
<!--
İzmir şehir seçimi shim'i (yalnız UI):
- Build (source) olmadan dropdown/mobil/modal şehir listesine İzmir seçeneği ekler.
- Seçim localStorage.selectedCity üzerinden yapılır (istanbul | antalya | izmir)
- URL:
- İstanbul -> prefixsiz
- Antalya -> /antalya prefixli
- İzmir -> /izmir prefixli
-->
<script>
(function () {
"use strict";
var STYLE_ID = "cbl-city-shim-style";
function getSelectedCity() {
try {
var c = localStorage.getItem("selectedCity") || "";
return c === "antalya" || c === "istanbul" || c === "izmir" ? c : "istanbul";
} catch (e) {
return "istanbul";
}
}
function cityFromPathOrStorage() {
var p = (window.location && window.location.pathname) || "/";
if (p === "/antalya" || p.indexOf("/antalya/") === 0) return "antalya";
if (p === "/izmir" || p.indexOf("/izmir/") === 0) return "izmir";
return getSelectedCity();
}
function ensureStyle() {
if (document.getElementById(STYLE_ID)) return;
var st = document.createElement("style");
st.id = STYLE_ID;
st.textContent =
"[data-cbl-city].cbl-active{background:#fff7ed !important;color:#c2410c !important;font-weight:600 !important;}" +
"[data-cbl-city]:not(.cbl-active):hover{background:#fff7ed !important;color:#c2410c !important;}";
document.head.appendChild(st);
}
function setText(el, text) {
if (!el) return;
var cur = el.textContent || "";
if (cur === text) return;
el.textContent = text;
}
function normalizeText(val) {
return (val || "")
.toString()
.replace(/\s+/g, " ")
.trim()
.toLowerCase();
}
function removeDuplicateCityLine(card, cityLabel) {
if (!card || !cityLabel) return;
var cityNorm = normalizeText(cityLabel);
var h3 = card.querySelector("h3");
var mainNorm = h3 ? normalizeText(h3.textContent) : "";
var nodes = card.querySelectorAll("p, span, div");
for (var i = 0; i < nodes.length; i++) {
var n = nodes[i];
if (!n || n === h3 || (h3 && h3.contains(n))) continue;
var text = n.textContent || "";
var norm = normalizeText(text);
if (!norm) continue;
var hasCity = norm.indexOf(cityNorm) !== -1;
var hasLigi = norm.indexOf("ligi") !== -1;
var hasDot = text.indexOf("•") !== -1 || text.indexOf("·") !== -1;
if (hasCity && !hasLigi && (hasDot || norm === cityNorm || norm === mainNorm)) {
if (n.parentNode) n.parentNode.removeChild(n);
}
}
}
function stripCityPrefix(pathname) {
if (!pathname) return "/";
if (pathname === "/antalya" || pathname === "/izmir") return "/";
if (pathname.indexOf("/antalya/") === 0) return pathname.replace(/^\/antalya/, "") || "/";
if (pathname.indexOf("/izmir/") === 0) return pathname.replace(/^\/izmir/, "") || "/";
return pathname;
}
function toIstanbulPath() {
var p = stripCityPrefix(window.location.pathname || "/");
return p || "/";
}
function toAntalyaPath() {
var p = window.location.pathname || "/";
if (p === "/antalya" || p.indexOf("/antalya/") === 0) return p;
p = stripCityPrefix(p);
if (p === "/" || p === "") return "/antalya";
return "/antalya" + p;
}
function toIzmirPath() {
var p = window.location.pathname || "/";
if (p === "/izmir" || p.indexOf("/izmir/") === 0) return p;
p = stripCityPrefix(p);
if (p === "/" || p === "") return "/izmir";
return "/izmir" + p;
}
function goCity(cityKey) {
// cityKey: 'istanbul' | 'antalya' | 'izmir'
try {
localStorage.setItem("selectedCity", cityKey);
window.location.href = cityKey === "antalya" ? toAntalyaPath() : cityKey === "izmir" ? toIzmirPath() : toIstanbulPath();
} catch (e) {
try {
window.location.reload();
} catch (e2) {}
}
}
function ensureHeaderLabel() {
var btn = document.querySelector('button[aria-label="Şehir seç"]');
if (!btn) return;
var spans = btn.querySelectorAll("span");
if (!spans || !spans.length) return;
var eff = cityFromPathOrStorage();
setText(spans[0], eff === "izmir" ? "İzmir" : eff === "antalya" ? "Antalya" : "İstanbul");
}
function markActive(container) {
if (!container) return;
var eff = cityFromPathOrStorage();
var btns = container.querySelectorAll("button[data-cbl-city]");
for (var i = 0; i < btns.length; i++) {
var ck = btns[i].getAttribute("data-cbl-city");
btns[i].classList.toggle("cbl-active", ck === eff);
}
}
function bindButton(btn, cityKey) {
if (!btn) return;
// NOTE: cloneNode(true) atributları kopyalar ama event listener'ları kopyalamaz.
// Bu yüzden "data-cbl-bound" gibi bir atributa göre erken çıkmak klonları tıklanamaz yapar.
// Guard'ı JS property ile yapıyoruz (klonlarda yoktur).
if (btn.__cblCityBound === cityKey) return;
btn.__cblCityBound = cityKey;
try {
btn.removeAttribute("disabled");
btn.removeAttribute("aria-disabled");
btn.disabled = false;
} catch (e) {}
btn.setAttribute("data-cbl-bound", "1");
btn.setAttribute("data-cbl-city", cityKey);
btn.addEventListener(
"click",
function (e) {
try {
e.preventDefault();
e.stopPropagation();
} catch (e2) {}
goCity(cityKey);
},
true
);
}
function ensureDropdown() {
var trigger = document.querySelector('button[aria-label="Şehir seç"]');
if (!trigger) return;
var menu = trigger.parentElement && trigger.parentElement.querySelector("div.rounded-lg.bg-white");
if (!menu) return;
ensureStyle();
// Bind existing Istanbul/Antalya
var menuBtns = menu.querySelectorAll("button");
var istBtn = null;
var antBtn = null;
for (var i = 0; i < menuBtns.length; i++) {
var t = (menuBtns[i].textContent || "");
if (!istBtn && t.indexOf("İstanbul") !== -1) istBtn = menuBtns[i];
if (!antBtn && t.indexOf("Antalya") !== -1) antBtn = menuBtns[i];
}
if (istBtn) bindButton(istBtn, "istanbul");
if (antBtn) bindButton(antBtn, "antalya");
// Add Izmir option (clone Antalya for layout)
if (antBtn && !menu.querySelector('button[data-cbl-city="izmir"]')) {
var iz = antBtn.cloneNode(true);
// cloneNode ile data-cbl-bound kopyalanabilir; klonun kesinlikle yeniden bağlanmasını sağla.
try {
iz.__cblCityBound = undefined;
iz.removeAttribute("data-cbl-bound");
iz.removeAttribute("disabled");
iz.removeAttribute("aria-disabled");
iz.disabled = false;
} catch (e) {}
iz.setAttribute("data-cbl-city", "izmir");
// reset active-looking tailwind tokens that might be cloned
iz.className = (iz.className || "")
.replace(/bg-orange-50/g, "")
.replace(/text-orange-600/g, "")
.replace(/font-semibold/g, "")
.trim();
var title = iz.querySelector(".font-medium");
var sub = iz.querySelector(".text-xs");
if (title) setText(title, "İzmir");
if (sub) setText(sub, "İzmir Ligi");
bindButton(iz, "izmir");
menu.appendChild(iz);
}
// Active state
markActive(menu);
ensureHeaderLabel();
}
function findByText(selector, text) {
var nodes = document.querySelectorAll(selector);
for (var i = 0; i < nodes.length; i++) {
var n = nodes[i];
if ((n.textContent || "").trim() === text) return n;
}
return null;
}
function ensureMobileMenu() {
var label = findByText("p", "Ş E H İ R");
if (!label) return;
var section = label.parentElement;
if (!section) return;
var list = section.querySelector("div.space-y-3");
if (!list) return;
ensureStyle();
var btns = list.querySelectorAll("button");
var istBtn = null;
var antBtn = null;
for (var i = 0; i < btns.length; i++) {
var t = (btns[i].textContent || "");
if (!istBtn && t.indexOf("İstanbul") !== -1) istBtn = btns[i];
if (!antBtn && t.indexOf("Antalya") !== -1) antBtn = btns[i];
}
if (istBtn) bindButton(istBtn, "istanbul");
if (antBtn) bindButton(antBtn, "antalya");
if (antBtn && !list.querySelector('button[data-cbl-city="izmir"]')) {
var iz = antBtn.cloneNode(true);
try {
iz.__cblCityBound = undefined;
iz.removeAttribute("data-cbl-bound");
iz.removeAttribute("disabled");
iz.removeAttribute("aria-disabled");
iz.disabled = false;
} catch (e) {}
iz.setAttribute("data-cbl-city", "izmir");
// Update title
var divs = iz.querySelectorAll("div");
for (var di = 0; di < divs.length; di++) {
if ((divs[di].textContent || "").trim() === "Antalya") {
setText(divs[di], "İzmir");
break;
}
}
var sub = iz.querySelector("div.text-xs");
if (sub) setText(sub, "İzmir Ligi");
bindButton(iz, "izmir");
list.appendChild(iz);
}
markActive(list);
ensureHeaderLabel();
}
function ensureModal() {
var h2 = findByText("h2", "Şehir Seçin");
if (!h2) return;
var modal = h2.closest("div.max-w-md");
if (!modal) return;
var grid = modal.querySelector("div.mt-8.grid");
if (!grid) return;
var cards = grid.querySelectorAll("button");
if (!cards || !cards.length) return;
var ist = null;
var ant = null;
for (var i = 0; i < cards.length; i++) {
var t = (cards[i].textContent || "");
if (!ist && t.indexOf("İstanbul") !== -1) ist = cards[i];
if (!ant && t.indexOf("Antalya") !== -1) ant = cards[i];
}
if (ist) bindButton(ist, "istanbul");
if (ant) bindButton(ant, "antalya");
if (ist) removeDuplicateCityLine(ist, "İstanbul");
if (ant) removeDuplicateCityLine(ant, "Antalya");
if (ant && !grid.querySelector('button[data-cbl-city="izmir"]')) {
var iz = ant.cloneNode(true);
try {
iz.__cblCityBound = undefined;
iz.removeAttribute("data-cbl-bound");
iz.removeAttribute("disabled");
iz.removeAttribute("aria-disabled");
iz.disabled = false;
} catch (e) {}
iz.setAttribute("data-cbl-city", "izmir");
var h3 = iz.querySelector("h3");
var p = iz.querySelector("p");
if (h3) setText(h3, "İzmir");
if (p) setText(p, "İzmir Ligi");
bindButton(iz, "izmir");
removeDuplicateCityLine(iz, "İzmir");
grid.appendChild(iz);
}
}
var _scheduled = false;
function schedule() {
if (_scheduled) return;
_scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
_scheduled = false;
try {
ensureModal();
ensureDropdown();
ensureMobileMenu();
ensureHeaderLabel();
} catch (e) {}
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
<!--
Fikstür sayfası PlayOff default shim'i (build erişimi olmadan):
- Fikstür görünümünde PlayOff sekmesini ilk yüklemede otomatik aktifler.
- URL bazlı (fikstur/fixture) ve başlık bazlı ("Fikstür") tespit kullanır.
- Yalnızca PlayOff zaten aktif değilse tıklar.
-->
<script>
(function () {
"use strict";
var attemptsByUrl = Object.create(null);
var MAX_ATTEMPTS_PER_URL = 24;
function normText(v) {
return (v || "")
.toString()
.replace(/\s+/g, " ")
.trim()
.toLowerCase();
}
function isFixtureByPath() {
var p = ((window.location && window.location.pathname) || "/").toLowerCase();
return p.indexOf("/fikstur") === 0 || p.indexOf("/fixture") === 0 || p.indexOf("/fikstur") === 0;
}
function hasFixtureHeading() {
var headings = document.querySelectorAll("h1, h2, h3, [role='heading']");
for (var i = 0; i < headings.length; i++) {
var t = normText(headings[i].textContent);
if (t === "fikstür" || t === "fikstur") return true;
}
return false;
}
function isFixtureView() {
return isFixtureByPath() || hasFixtureHeading();
}
function isActiveTab(btn) {
if (!btn) return false;
var aria = (btn.getAttribute && btn.getAttribute("aria-selected")) || "";
if (String(aria).toLowerCase() === "true") return true;
var cls = btn.className || "";
return cls.indexOf("bg-white") !== -1 && cls.indexOf("text-orange-600") !== -1;
}
function findPlayoffButton() {
var buttons = document.querySelectorAll("button");
for (var i = 0; i < buttons.length; i++) {
var t = normText(buttons[i].textContent);
if (!t) continue;
var compact = t.replace(/[-\s]+/g, "");
var hasPlayoff = compact.indexOf("playoff") !== -1;
var hasMatchesWord = t.indexOf("maç") !== -1 || t.indexOf("mac") !== -1;
if (hasPlayoff && hasMatchesWord) {
return buttons[i];
}
if (t === "playoff" || t === "play off" || t === "play-off" || t === "play offlar" || t === "playofflar") {
return buttons[i];
}
}
return null;
}
function getUrlKey() {
return (window.location && window.location.pathname ? window.location.pathname : "") +
(window.location && window.location.search ? window.location.search : "") +
(window.location && window.location.hash ? window.location.hash : "");
}
function getAttempt(urlKey) {
return attemptsByUrl[urlKey] || 0;
}
function bumpAttempt(urlKey) {
attemptsByUrl[urlKey] = getAttempt(urlKey) + 1;
}
function apply() {
if (!isFixtureView()) return;
var key = getUrlKey();
var btn = findPlayoffButton();
if (!btn) return;
if (isActiveTab(btn)) {
attemptsByUrl[key] = MAX_ATTEMPTS_PER_URL;
return;
}
if (getAttempt(key) >= MAX_ATTEMPTS_PER_URL) return;
try {
btn.click();
bumpAttempt(key);
// Uygulama state'i sekmeyi tekrar "Sezon Maçları"na çekerse,
// kısa aralıklarla bir iki kez daha doğrula.
window.setTimeout(schedule, 80);
window.setTimeout(schedule, 260);
} catch (e) {}
}
var scheduled = false;
function schedule() {
if (scheduled) return;
scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
scheduled = false;
apply();
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
window.addEventListener("popstate", schedule);
window.addEventListener("hashchange", schedule);
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
<!--
Fikstür sayfası PlayOff banner shim'i (build erişimi olmadan):
- PlayOff aktifken /image/playoff.jpg banner'ını en üst içerik alanına ekler.
- PlayOff aktif değilse banner'ı kaldırır.
-->
<script>
(function () {
"use strict";
var BANNER_ID = "cbl-playoff-banner";
function normText(v) {
return (v || "")
.toString()
.replace(/\s+/g, " ")
.trim()
.toLowerCase();
}
function isFixtureByPath() {
var p = ((window.location && window.location.pathname) || "/").toLowerCase();
return p.indexOf("/fikstur") === 0 || p.indexOf("/fixture") === 0;
}
function hasFixtureHeading() {
var headings = document.querySelectorAll("h1, h2, h3, [role='heading']");
for (var i = 0; i < headings.length; i++) {
var t = normText(headings[i].textContent);
if (t === "fikstür" || t === "fikstur") return true;
}
return false;
}
function isFixtureView() {
return isFixtureByPath() || hasFixtureHeading();
}
function isActiveTab(btn) {
if (!btn) return false;
var aria = (btn.getAttribute && btn.getAttribute("aria-selected")) || "";
if (String(aria).toLowerCase() === "true") return true;
var cls = btn.className || "";
return cls.indexOf("bg-orange-500") !== -1 || (cls.indexOf("bg-white") !== -1 && cls.indexOf("text-orange-600") !== -1);
}
function isPlayoffLabel(text) {
var compact = normText(text).replace(/[-\s]+/g, "");
return compact.indexOf("playoff") !== -1;
}
function findMatchTypeContainer() {
var labels = document.querySelectorAll("label");
for (var i = 0; i < labels.length; i++) {
if (normText(labels[i].textContent) !== "maç tipi" && normText(labels[i].textContent) !== "mac tipi") continue;
var parent = labels[i].parentElement;
if (!parent) continue;
var buttonsWrap = parent.querySelector("div.flex.flex-wrap") || parent.querySelector("div");
if (buttonsWrap && buttonsWrap.querySelector("button")) return buttonsWrap;
}
return null;
}
function isPlayoffActive() {
var container = findMatchTypeContainer();
var buttons = container ? container.querySelectorAll("button") : document.querySelectorAll("button");
for (var i = 0; i < buttons.length; i++) {
var btn = buttons[i];
if (!isActiveTab(btn)) continue;
if (isPlayoffLabel(btn.textContent || "")) return true;
}
return false;
}
function findBannerTargetSection() {
var headings = document.querySelectorAll("h1, h2, h3");
for (var i = 0; i < headings.length; i++) {
if (normText(headings[i].textContent) !== "maç filtreleri" && normText(headings[i].textContent) !== "mac filtreleri") continue;
var section = headings[i].closest("section");
if (section && section.parentNode) return section;
}
var header = document.querySelector("header");
if (header && header.parentNode) {
var next = header.nextElementSibling;
if (next) return next;
}
return null;
}
function removeBanner() {
var existing = document.getElementById(BANNER_ID);
if (existing && existing.parentNode) existing.parentNode.removeChild(existing);
}
function ensureBanner() {
var existing = document.getElementById(BANNER_ID);
if (existing) return existing;
var wrapper = document.createElement("section");
wrapper.id = BANNER_ID;
wrapper.className = "container mx-auto px-4 pt-8";
var frame = document.createElement("div");
frame.className = "overflow-hidden rounded-3xl border border-orange-200 bg-white shadow-xl shadow-slate-900/5";
var img = document.createElement("img");
img.src = "/image/playoff.jpg";
img.alt = "PlayOff banner";
img.loading = "eager";
img.decoding = "async";
img.className = "block h-auto w-full";
img.style.display = "block";
frame.appendChild(img);
wrapper.appendChild(frame);
return wrapper;
}
function apply() {
if (!isFixtureView()) {
removeBanner();
return;
}
if (!isPlayoffActive()) {
removeBanner();
return;
}
var targetSection = findBannerTargetSection();
if (!targetSection || !targetSection.parentNode) return;
var banner = ensureBanner();
var parent = targetSection.parentNode;
var desiredNextSibling = targetSection.nextSibling;
if (banner.parentNode !== parent || banner.previousSibling !== targetSection) {
parent.insertBefore(banner, desiredNextSibling);
}
}
var scheduled = false;
function schedule() {
if (scheduled) return;
scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
scheduled = false;
apply();
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
window.addEventListener("popstate", schedule);
window.addEventListener("hashchange", schedule);
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
<!--
İzmir Genius Sports widget override (build erişimi olmadan):
- İzmir için widget ID'sini 92NVNSQSTPEFPVE51MG9YUF6G12RN6 olarak günceller.
- Varsayılan (İstanbul) ID: 9LKP40OSQ0OFXC6YU6RT6YU52W0BJ8
-->
<!--
Şehir logo override (build erişimi olmadan):
- İzmir için header ve footer logolarını /image/izmir.png yapar.
- Antalya için header ve footer logolarını /image/antalya.jpeg yapar.
-->
<script>
(function () {
"use strict";
var CITY_LOGOS = {
izmir: "/image/izmir.png",
antalya: "/image/antalya.png",
};
var DEFAULT_MARKERS = ["menu_logo", "footer_logo", "tbf_header"];
function getSelectedCity() {
try {
var c = localStorage.getItem("selectedCity") || "";
return c === "antalya" || c === "istanbul" || c === "izmir" ? c : "istanbul";
} catch (e) {
return "istanbul";
}
}
function cityFromPathOrStorage() {
var p = (window.location && window.location.pathname) || "/";
if (p === "/antalya" || p.indexOf("/antalya/") === 0) return "antalya";
if (p === "/izmir" || p.indexOf("/izmir/") === 0) return "izmir";
return getSelectedCity();
}
function getCityLogo() {
var city = cityFromPathOrStorage();
return CITY_LOGOS[city] || "";
}
function shouldSwap(img) {
if (!img) return false;
var src = (img.currentSrc || img.src || "").toLowerCase();
for (var i = 0; i < DEFAULT_MARKERS.length; i++) {
if (src.indexOf(DEFAULT_MARKERS[i]) !== -1) return true;
}
var alt = (img.alt || "").toLowerCase();
if (alt.indexOf("cbl") !== -1 || alt.indexOf("corporate") !== -1 || alt.indexOf("basket") !== -1) return true;
return false;
}
function setLogo(img, logoPath) {
if (!img || !shouldSwap(img)) return;
if (!logoPath) return;
if (img.src !== logoPath) img.src = logoPath;
if (img.getAttribute && img.getAttribute("srcset")) img.setAttribute("srcset", logoPath);
}
function updateContainer(container, logoPath) {
if (!container) return;
var imgs = container.querySelectorAll("img");
for (var i = 0; i < imgs.length; i++) setLogo(imgs[i], logoPath);
}
function apply() {
var logoPath = getCityLogo();
if (!logoPath) return;
var header = document.querySelector("header") || document.querySelector('[role="banner"]');
var footer = document.querySelector("footer") || document.querySelector('[role="contentinfo"]');
updateContainer(header, logoPath);
updateContainer(footer, logoPath);
if (!header && !footer) {
var imgs = document.querySelectorAll("img");
for (var i = 0; i < imgs.length; i++) setLogo(imgs[i], logoPath);
}
}
var scheduled = false;
function schedule() {
if (scheduled) return;
scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
scheduled = false;
apply();
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
<script>
(function () {
"use strict";
var IZMIR_WIDGET_ID = "92NVNSQSTPEFPVE51MG9YUF6G12RN6";
var DEFAULT_WIDGET_ID = "9LKP40OSQ0OFXC6YU6RT6YU52W0BJ8";
function getSelectedCity() {
try {
var c = localStorage.getItem("selectedCity") || "";
return c === "antalya" || c === "istanbul" || c === "izmir" ? c : "istanbul";
} catch (e) {
return "istanbul";
}
}
function cityFromPathOrStorage() {
var p = (window.location && window.location.pathname) || "/";
if (p === "/antalya" || p.indexOf("/antalya/") === 0) return "antalya";
if (p === "/izmir" || p.indexOf("/izmir/") === 0) return "izmir";
return getSelectedCity();
}
function rewriteScript(el) {
if (!el || !el.tagName) return;
if (String(el.tagName).toLowerCase() !== "script") return;
if (!el.src || el.src.indexOf(DEFAULT_WIDGET_ID) === -1) return;
if (cityFromPathOrStorage() !== "izmir") return;
el.src = "https://widget.wh.geniussports.com/widget/?" + IZMIR_WIDGET_ID;
}
function ensureIzmirWidget() {
if (cityFromPathOrStorage() !== "izmir") return;
var defaultEl = document.getElementById("spw_" + DEFAULT_WIDGET_ID);
if (!defaultEl) return;
if (!document.getElementById("spw_" + IZMIR_WIDGET_ID)) {
defaultEl.id = "spw_" + IZMIR_WIDGET_ID;
}
try {
delete window["spw_" + DEFAULT_WIDGET_ID];
} catch (e) {}
window["spw_" + IZMIR_WIDGET_ID] = {};
var oldScript = document.querySelector('script[src*="' + DEFAULT_WIDGET_ID + '"]');
if (oldScript && oldScript.parentNode) oldScript.parentNode.removeChild(oldScript);
if (!document.querySelector('script[src*="' + IZMIR_WIDGET_ID + '"]')) {
var s = document.createElement("script");
s.async = true;
s.src = "https://widget.wh.geniussports.com/widget/?" + IZMIR_WIDGET_ID;
var ref = document.getElementsByTagName("script")[0];
if (ref && ref.parentNode) ref.parentNode.insertBefore(s, ref);
}
}
function schedule() {
(window.requestAnimationFrame || window.setTimeout)(ensureIzmirWidget, 0);
}
// Script ekleme anında ID’yi düzelt
try {
var _appendChild = Element.prototype.appendChild;
Element.prototype.appendChild = function (child) {
try {
rewriteScript(child);
} catch (e) {}
return _appendChild.call(this, child);
};
var _insertBefore = Element.prototype.insertBefore;
Element.prototype.insertBefore = function (newNode, referenceNode) {
try {
rewriteScript(newNode);
} catch (e) {}
return _insertBefore.call(this, newNode, referenceNode);
};
} catch (e) {}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
<!--
İstatistikler sayfası Sezon/Kariyer sekme shim'i (build erişimi olmadan):
- İstanbul / Antalya / İzmir için tek kodla çalışır.
- /stats/unified isteklerine mode'a göre parametre ekler:
* Sezon: season_id korunur, career kaldırılır
* Kariyer: career=1 eklenir, season_id kaldırılır
- UI'ya "Sezon İstatistikleri" / "Kariyer İstatistikleri" sekmesi ekler.
-->
<script>
(function () {
"use strict";
// Bu shim artık asset içindeki native istatistik implementasyonu ile değiştirildi.
return;
var MODE_KEY = "cblStatsMode";
var TAB_WRAP_ID = "cbl-stats-mode-tabs";
var STYLE_ID = "cbl-stats-mode-style";
function normalizeText(v) {
return (v || "")
.toString()
.replace(/\s+/g, " ")
.trim()
.toLowerCase();
}
function getMode() {
try {
var m = localStorage.getItem(MODE_KEY);
return m === "career" ? "career" : "season";
} catch (e) {
return "season";
}
}
function setMode(mode) {
try {
localStorage.setItem(MODE_KEY, mode === "career" ? "career" : "season");
} catch (e) {}
}
function stripCityPrefix(pathname) {
var p = pathname || "/";
if (p === "/antalya" || p.indexOf("/antalya/") === 0) return p.replace(/^\/antalya/, "") || "/";
if (p === "/izmir" || p.indexOf("/izmir/") === 0) return p.replace(/^\/izmir/, "") || "/";
return p;
}
function isStatsPage() {
var path = stripCityPrefix((window.location && window.location.pathname) || "/");
if (path === "/istatistikler" || path.indexOf("/istatistikler/") === 0) return true;
var h1 = document.querySelector("h1");
if (h1 && normalizeText(h1.textContent) === "istatistikler") return true;
var labels = document.querySelectorAll("label");
var hasSeason = false;
var hasScope = false;
var hasMetric = false;
for (var i = 0; i < labels.length; i++) {
var t = normalizeText(labels[i].textContent).replace(/:$/, "");
if (t === "sezon") hasSeason = true;
if (t === "kapsam") hasScope = true;
if (t === "metrik") hasMetric = true;
}
return hasSeason && hasScope && hasMetric;
}
function ensureStyle() {
if (document.getElementById(STYLE_ID)) return;
var st = document.createElement("style");
st.id = STYLE_ID;
st.textContent =
"#" + TAB_WRAP_ID + "{display:inline-flex;gap:.35rem;padding:.25rem;border:1px solid #e2e8f0;border-radius:.75rem;background:#f8fafc;}" +
"#" + TAB_WRAP_ID + " button{border:0;background:transparent;color:#475569;font-size:12px;font-weight:600;padding:.45rem .7rem;border-radius:.55rem;cursor:pointer;transition:all .2s ease;}" +
"#" + TAB_WRAP_ID + " button:hover{color:#0f172a;}" +
"#" + TAB_WRAP_ID + " button.cbl-active{background:#fff;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.12);}" +
".cbl-stats-getir-btn{border:1px solid #334155;background:#334155;color:#fff;font-size:12px;font-weight:700;padding:.62rem .95rem;border-radius:.7rem;cursor:pointer;transition:all .2s ease;}" +
".cbl-stats-getir-btn:hover{background:#0f172a;border-color:#0f172a;}";
document.head.appendChild(st);
}
function findControlBlocks() {
var labels = document.querySelectorAll("label");
var seasonLabel = null;
var scopeLabel = null;
var metricLabel = null;
for (var i = 0; i < labels.length; i++) {
var t = normalizeText(labels[i].textContent).replace(/:$/, "");
if (!seasonLabel && t === "sezon") seasonLabel = labels[i];
if (!scopeLabel && t === "kapsam") scopeLabel = labels[i];
if (!metricLabel && t === "metrik") metricLabel = labels[i];
}
var seasonBlock = seasonLabel ? seasonLabel.parentElement : null;
var scopeBlock = scopeLabel ? scopeLabel.parentElement : null;
var metricBlock = metricLabel ? metricLabel.parentElement : null;
var controlsRow = seasonBlock ? seasonBlock.parentElement : null;
return {
seasonBlock: seasonBlock,
scopeBlock: scopeBlock,
metricBlock: metricBlock,
controlsRow: controlsRow,
seasonSelect: seasonBlock ? seasonBlock.querySelector("select") : null,
scopeSelect: scopeBlock ? scopeBlock.querySelector("select") : null,
metricSelect: metricBlock ? metricBlock.querySelector("select") : null,
};
}
function getCityPrefix() {
var pathname = (window.location && window.location.pathname) || "/";
if (pathname === "/antalya" || pathname.indexOf("/antalya/") === 0) return "/antalya";
if (pathname === "/izmir" || pathname.indexOf("/izmir/") === 0) return "/izmir";
return "";
}
function getUnifiedEndpoint() {
return getCityPrefix() + "/api/v1/stats/unified";
}
function buildAppPath(type, id) {
var prefix = getCityPrefix();
return prefix + "/" + type + "/" + id;
}
function getStatsTableParts() {
var h1 = document.querySelector("h1");
if (!h1 || normalizeText(h1.textContent) !== "istatistikler") return null;
var section = h1.closest("div") || document.body;
var table = document.querySelector("table");
if (!table) return null;
return {
table: table,
theadRow: table.querySelector("thead tr"),
tbody: table.querySelector("tbody"),
};
}
function escapeHtml(value) {
return (value == null ? "" : String(value))
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/\"/g, """)
.replace(/'/g, "'");
}
function formatStatValue(value) {
if (value == null || value === "") return "-";
if (typeof value === "number") {
if (value % 1 === 0) return value.toLocaleString("tr-TR");
return value.toLocaleString("tr-TR", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}
return escapeHtml(value);
}
function setStatsLoading(message) {
var parts = getStatsTableParts();
if (!parts || !parts.tbody) return;
parts.tbody.innerHTML = '<tr><td colspan="5" class="px-6 py-12 text-center text-slate-500">' + escapeHtml(message || "Yükleniyor...") + "</td></tr>";
}
function renderStatsTable(scope, payload) {
var parts = getStatsTableParts();
if (!parts || !parts.theadRow || !parts.tbody) return;
var columns = Array.isArray(payload && payload.columns) ? payload.columns.filter(function (c) { return c && String(c).trim() !== ""; }) : [];
var rows = Array.isArray(payload && payload.data) ? payload.data : [];
var nameLabel = scope === "teams" ? "Takım" : "Oyuncu";
var headerHtml = '<th class="w-16 px-6 py-4">Sıra</th>' + '<th class="px-6 py-4">' + nameLabel + '</th>';
if (columns.length) {
for (var i = 0; i < columns.length; i++) {
headerHtml += '<th class="w-32 px-6 py-4 text-left">' + escapeHtml(columns[i]) + '</th>';
}
} else {
headerHtml += '<th class="w-32 px-6 py-4 text-left">Değer</th>';
}
parts.theadRow.innerHTML = headerHtml;
if (!rows.length) {
parts.tbody.innerHTML = '<tr><td colspan="' + (columns.length + 2 || 3) + '" class="px-6 py-12 text-center text-slate-500">Veri bulunamadı</td></tr>';
return;
}
parts.tbody.innerHTML = rows.map(function (row, index) {
var id = scope === "teams" ? (row.team_id || row.id) : (row.player_id || row.id);
var name = scope === "teams" ? (row.team_name || row.name || "-") : (row.player_name || row.name || "-");
var image = scope === "teams" ? row.logo : (row.image || row.photo || "");
var target = id ? buildAppPath(scope === "teams" ? "takimlar" : "oyuncular", id) : "";
var nameCell = '<div class="flex items-center gap-3">';
if (image) {
nameCell += '<img src="' + escapeHtml(image) + '" alt="' + escapeHtml(name) + '" class="w-8 h-8 ' + (scope === 'teams' ? 'rounded object-cover' : 'rounded-full object-cover') + '">';
}
if (target) {
nameCell += '<a href="' + escapeHtml(target) + '" class="font-semibold text-orange-500 hover:text-orange-600 transition-colors">' + escapeHtml(name) + '</a>';
} else {
nameCell += '<span class="font-semibold text-slate-900">' + escapeHtml(name) + '</span>';
}
nameCell += '</div>';
var valueCells = '';
if (columns.length) {
for (var c = 0; c < columns.length; c++) {
valueCells += '<td class="px-6 py-4 text-left text-slate-900 font-semibold">' + formatStatValue(row[columns[c]]) + '</td>';
}
} else {
valueCells += '<td class="px-6 py-4 text-left text-slate-900 font-semibold">' + formatStatValue(row.value) + '</td>';
}
return '<tr class="border-b border-slate-100 text-sm text-slate-700 transition hover:bg-orange-50">' +
'<td class="px-6 py-4 font-semibold text-slate-500">' + (index + 1) + '</td>' +
'<td class="px-6 py-4">' + nameCell + '</td>' +
valueCells +
'</tr>';
}).join('');
}
function loadStatsTable() {
var found = findControlBlocks();
if (!found || !found.metricSelect || !found.scopeSelect) return;
var mode = getMode();
var metricId = found.metricSelect.value;
var scope = found.scopeSelect.value;
var seasonId = found.seasonSelect ? found.seasonSelect.value : "";
if (!metricId) return;
var params = new URLSearchParams();
params.set("scope", scope);
params.set("metric_id", metricId);
params.set("limit", "100");
params.set("_ts", String(Date.now()));
if (mode === "career") {
params.set("career", "1");
} else if (seasonId) {
params.set("season_id", seasonId);
}
setStatsLoading("Yükleniyor...");
fetch(getUnifiedEndpoint() + "?" + params.toString(), {
method: "GET",
credentials: "same-origin",
headers: {
"Accept": "application/json"
}
})
.then(function (response) { return response.json(); })
.then(function (payload) {
renderStatsTable(scope, payload || {});
})
.catch(function () {
setStatsLoading("Veri alınamadı");
});
}
function dispatchNativeChange(el) {
if (!el) return;
try {
el.dispatchEvent(new Event("input", { bubbles: true }));
el.dispatchEvent(new Event("change", { bubbles: true }));
} catch (e) {}
}
function setNativeSelectValue(el, value) {
if (!el) return;
try {
var descriptor = Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, "value");
if (descriptor && typeof descriptor.set === "function") {
descriptor.set.call(el, value);
} else {
el.value = value;
}
} catch (e) {
el.value = value;
}
}
function getLiveMetricSelect() {
var found = findControlBlocks();
return found && found.metricSelect ? found.metricSelect : null;
}
function triggerStatsRefetch(metricSelect) {
metricSelect = metricSelect || getLiveMetricSelect();
if (!metricSelect) return;
var opts = metricSelect.options || [];
if (!opts.length) return;
if (metricSelect.__cblStatsRefetching) return;
metricSelect.__cblStatsRefetching = true;
var original = metricSelect.selectedIndex;
if (opts.length === 1) {
dispatchNativeChange(metricSelect);
window.setTimeout(function () {
metricSelect.__cblStatsRefetching = false;
}, 50);
return;
}
var alt = original === 0 ? 1 : 0;
setNativeSelectValue(metricSelect, opts[alt].value);
dispatchNativeChange(metricSelect);
setTimeout(function () {
setNativeSelectValue(metricSelect, opts[original].value);
dispatchNativeChange(metricSelect);
window.setTimeout(function () {
metricSelect.__cblStatsRefetching = false;
}, 80);
}, 40);
}
function applyModeToSeasonBlock(mode, seasonBlock, seasonSelect) {
var isCareer = mode === "career";
if (seasonSelect) seasonSelect.disabled = isCareer;
if (seasonBlock) {
seasonBlock.style.opacity = isCareer ? "0.6" : "1";
}
}
function updateTabButtons(wrap, mode) {
if (!wrap) return;
var btns = wrap.querySelectorAll("button[data-mode]");
for (var i = 0; i < btns.length; i++) {
var b = btns[i];
var isActive = b.getAttribute("data-mode") === mode;
b.classList.toggle("cbl-active", isActive);
}
}
function ensureTabs(controlsRow, seasonBlock, seasonSelect, metricSelect) {
if (!controlsRow) return;
ensureStyle();
if (metricSelect && !metricSelect.__cblStatsMetricBound) {
metricSelect.__cblStatsMetricBound = true;
metricSelect.addEventListener("change", function () {
window.setTimeout(function () {
loadStatsTable();
}, 30);
});
}
var found = findControlBlocks();
if (found.scopeSelect && !found.scopeSelect.__cblStatsScopeBound) {
found.scopeSelect.__cblStatsScopeBound = true;
found.scopeSelect.addEventListener("change", function () {
window.setTimeout(function () {
loadStatsTable();
}, 30);
});
}
if (seasonSelect && !seasonSelect.__cblStatsSeasonBound) {
seasonSelect.__cblStatsSeasonBound = true;
seasonSelect.addEventListener("change", function () {
if (getMode() === "career") return;
window.setTimeout(function () {
loadStatsTable();
}, 30);
});
}
var wrap = document.getElementById(TAB_WRAP_ID);
if (!wrap) {
wrap = document.createElement("div");
wrap.id = TAB_WRAP_ID;
var seasonBtn = document.createElement("button");
seasonBtn.type = "button";
seasonBtn.setAttribute("data-mode", "season");
seasonBtn.textContent = "Sezon İstatistikleri";
var careerBtn = document.createElement("button");
careerBtn.type = "button";
careerBtn.setAttribute("data-mode", "career");
careerBtn.textContent = "Kariyer İstatistikleri";
function onSwitch(mode) {
var current = getMode();
if (current === mode) return;
setMode(mode);
updateTabButtons(wrap, mode);
applyModeToSeasonBlock(mode, seasonBlock, seasonSelect);
window.setTimeout(function () {
loadStatsTable();
}, 40);
}
seasonBtn.addEventListener("click", function () {
onSwitch("season");
});
careerBtn.addEventListener("click", function () {
onSwitch("career");
});
wrap.appendChild(seasonBtn);
wrap.appendChild(careerBtn);
controlsRow.insertBefore(wrap, controlsRow.firstChild || null);
}
var fetchBtn = controlsRow.querySelector("button[data-cbl-stats-fetch]");
if (!fetchBtn) {
fetchBtn = document.createElement("button");
fetchBtn.type = "button";
fetchBtn.setAttribute("data-cbl-stats-fetch", "1");
fetchBtn.className = "cbl-stats-getir-btn";
fetchBtn.textContent = "Getir";
fetchBtn.addEventListener("click", function () {
loadStatsTable();
});
controlsRow.appendChild(fetchBtn);
}
var mode = getMode();
updateTabButtons(wrap, mode);
applyModeToSeasonBlock(mode, seasonBlock, seasonSelect);
if (!controlsRow.__cblStatsInitialLoadDone) {
controlsRow.__cblStatsInitialLoadDone = true;
window.setTimeout(function () {
loadStatsTable();
}, 120);
}
}
function rewriteUnifiedUrl(url) {
try {
if (!url || typeof url !== "string") return url;
if (url.indexOf("/stats/unified") === -1) return url;
var mode = getMode();
var absolute = new URL(url, window.location.origin);
if (mode === "career") {
absolute.searchParams.set("career", "1");
absolute.searchParams.delete("season_id");
} else {
absolute.searchParams.delete("career");
}
if (url.indexOf("http://") === 0 || url.indexOf("https://") === 0) {
return absolute.toString();
}
return absolute.pathname + absolute.search + absolute.hash;
} catch (e) {
return url;
}
}
function patchNetwork() {
if (window.__cblStatsModeNetworkPatched) return;
window.__cblStatsModeNetworkPatched = true;
if (window.fetch) {
var _fetch = window.fetch;
window.fetch = function (input, init) {
try {
if (typeof input === "string") {
input = rewriteUnifiedUrl(input);
} else if (input && typeof input.url === "string") {
input = new Request(rewriteUnifiedUrl(input.url), input);
}
} catch (e) {}
return _fetch.call(this, input, init);
};
}
if (window.XMLHttpRequest && window.XMLHttpRequest.prototype) {
var _open = window.XMLHttpRequest.prototype.open;
window.XMLHttpRequest.prototype.open = function (method, url) {
return _open.call(this, method, rewriteUnifiedUrl(url));
};
}
}
function apply() {
if (!isStatsPage()) return;
patchNetwork();
var found = findControlBlocks();
if (!found.controlsRow || !found.seasonBlock) return;
ensureTabs(found.controlsRow, found.seasonBlock, found.seasonSelect, found.metricSelect);
}
var scheduled = false;
function schedule() {
if (scheduled) return;
scheduled = true;
(window.requestAnimationFrame || window.setTimeout)(function () {
scheduled = false;
apply();
}, 0);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", schedule, { once: true });
} else {
schedule();
}
window.addEventListener("popstate", schedule);
window.addEventListener("hashchange", schedule);
try {
var obs = new MutationObserver(schedule);
obs.observe(document.documentElement, { childList: true, subtree: true });
} catch (e) {}
})();
</script>
</body>
</html>
HTTP/1.1 200 OK
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
Content-Type: text/html
Last-Modified: Thu, 19 Mar 2026 00:28:04 GMT
Accept-Ranges: bytes
Content-Encoding: br
Vary: Accept-Encoding
Content-Length: 12459
Date: Sun, 22 Mar 2026 13:16:19 GMT
Server: LiteSpeed