Live Match Tracker has an option to change default order of its tabs by passing tabs
property to SIR
function. This option also contols which tabs are enabled.
tabs
property is an object with sportId {number}
as key and array of strings as value. For example:
tabs: { 1: ['statistics', 'headToHead', 'standings', 'timeline', 'lineups'] }
, where 1
is a sportId
(soccer in this case).
Every sport has its own available tabs. Here is the list for all sports tabs:
1: ['statistics', 'headToHead', 'standings', 'timeline', 'lineups'], // soccer
2: ['statistics', 'headToHead', 'standings', 'timeline', 'lineups', 'boxscore'], // basket
3: ['statistics', 'boxScore', 'headToHead', 'standings', 'probabilities', 'timeline'], // baseball
4: ['statistics', 'headToHead', 'standings', 'timeline'], // hockey
5: ['statistics', 'headToHead', 'standings', 'timeline', 'pointByPoint'], // tennis
6: ['statistics', 'headToHead', 'standings', 'timeline', 'lineups'], // handball
12: ['statistics', 'headToHead', 'standings', 'timeline'], // rugby
16: ['statistics', 'headToHead', 'standings', 'boxscore', 'probabilities', 'lineups'], // football
19: ['statistics', 'headToHead', 'standings', 'timeline'], // snooker
20: ['statistics', 'headToHead', 'standings'], // table tennis
21: ['scorecard', 'statistics', 'headToHead', 'standings', 'lineups', 'probabilities'], // cricket
22: ['statistics', 'headToHead', 'standings', 'timeline'], // darts
23: ['statistics', 'headToHead', 'standings'], // volleyball
29: ['statistics', 'headToHead', 'standings', 'timeline'], // futsal
31: ['statistics', 'headToHead', 'standings'], // badminton
34: ['statistics', 'headToHead', 'standings'], // beach volleyball
40: ['track', 'leaderboard', 'standings', 'timeline', 'headToHead'] // formula
137: ['statistics', 'headToHead', 'standings', 'timeline', 'lineups'], // esport_soccer
153: ['statistics', 'headToHead', 'standings', 'timeline'], // esport_basketball
195: ['statistics', 'headToHead', 'standings', 'timeline'] // esport_ice_hockey
For every sport you can:
- re-order tabs by changing order of strings in array,
- disable tabs by removing specific strings from array.
Bellow is an example code for soccer with removed statistics
tab and timeline
set as first tab:
Code
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
Live Match Tracker Tabs Re-order
</title>
<style>
body {
display: flex;
justify-content: center;
}
.sr-widgets {
max-width: 620px;
width: 100%;
}
.sr-widget {
border: rgba(0,0,0,0.12) solid 1px;
margin-bottom: 24px;
}
</style>
</head>
<body>
<script>
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script", "https://widgets.sir.sportradar.com/sportradar/widgetloader", "SIR", {
theme: "betradar", // using custom theme
language: "en"
});
SIR("addWidget", ".sr-widget-1", "match.lmtPlus", {
forceTeamInvert: true,
layout: "topdown",
matchId: match_id_here,
tabs: {
1: ['timeline', 'lineups', 'headToHead', 'standings']
}
});
</script>
<div class="sr-widgets">
<div class="sr-widget sr-widget-1"></div>
</div>
</body>
</html>