Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JS code to open Asian Handicap
uid(4)._onClick();
Apply the below JS code to open / close 0.5
page.togleTableContent('P-0.50-0-0',this);
Apply the below JS code to open / close -0.5
page.togleTableContent('P--0.50-0-0',this);
Repeat the same procedure for -0.5 too and any other values that you require
JS code to open bet365 '1' opening odds :
var rows = document.getElementsByClassName('lo');
var row;
for (var i = rows.length - 1; i >= 0; i--) {
row = rows[i];
if(row.innerHTML.includes('blogos l16')) {
var event = new Event('mouseover');
row.children[2].children[0].dispatchEvent(event);
break;
}
}
The tool tip corresponding to Bet365 will be opened
Now highlight this tooltip using mouse. This movement is a bit tricky and you may need a few tries to obtain the data in the tool tip.If you have captured correctly, you should see in the capture window the complete data in the tool tip including 'Opening Odds: .....'
Apply the below RegEx string on the captured data to obtain the Opening Odd :
Opening odds:[^,]*,\s*[^\s]*\s*(.*)
JS code to open bet365 '2' opening odds :
var rows = document.getElementsByClassName('lo');
var row;
for (var i = rows.length - 1; i >= 0; i--) {
row = rows[i];
if(row.innerHTML.includes('blogos l16')) {
var event = new Event('mouseover');
row.children[3].children[0].dispatchEvent(event);
break;
}
}
For bet365, the blogos value is 16. To find out the blogos values each bookmaker, click on the bookmaker name and select More Options > capture HTML
For 18bet the JS codes would be :
var rows = document.getElementsByClassName('lo');
var row;
for (var i = rows.length - 1; i >= 0; i--) {
row = rows[i];
if(row.innerHTML.includes('blogos l416')) {
var event = new Event('mouseover');
row.children[2].children[0].dispatchEvent(event);
break;
}
}
var rows = document.getElementsByClassName('lo');
var row;
for (var i = rows.length - 1; i >= 0; i--) {
row = rows[i];
if(row.innerHTML.includes('blogos l416')) {
var event = new Event('mouseover');
row.children[3].children[0].dispatchEvent(event);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment