Last active
May 14, 2024 09:47
-
-
Save sysnucleus/d3747dcbdabf6979a00e0be53e2ba887 to your computer and use it in GitHub Desktop.
New OddsPortal Codes for WebHarvy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------------------- | |
// Remove all headers | |
//--------------------------------------------------------------------------- | |
els = document.getElementsByClassName('flex items-center justify-start'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
el = els[i].nextSibling; | |
if(el && el.parentElement) { | |
el.parentElement.removeChild(el); | |
els[i].parentElement.removeChild(els[i]); | |
} | |
} | |
//------------------------------------------------------------------------------- | |
// Closing Odds (1, X, 2) | |
// For Bet365, change bookmaker name as required, for example: Pinnacle[^\d]*(.*) | |
//-------------------------------------------------------------------------------- | |
bet365[^\d-]*(.*) | |
bet365[^\d-]*.*\s*(.*) | |
bet365[^\d-]*.*\s*.*\s*(.*) | |
//----------------------------------------------------------------- | |
// Code to expand the Over/Under+2.5 section (edit for other O/U values) | |
//----------------------------------------------------------------- | |
els = document.getElementsByClassName('flex w-full items-center'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].innerText.includes('Over/Under +2.5')) { | |
els[i].click(); | |
break; | |
} | |
} | |
//---------------------------------------------------------------------------------- | |
// RegEx Codes for O/U values | |
//---------------------------------------------------------------------------------- | |
//---------------------------------------------------------------------------------- | |
// Over / Under values of 1xBet | |
//---------------------------------------------------------------------------------- | |
1xBet[^\d]*.*\s*(.*) | |
1xBet[^\d]*.*\s*.*\s*(.*) | |
//---------------------------------------------------------------------------------- | |
// Over / Under values of pinnacle | |
//---------------------------------------------------------------------------------- | |
Pinnacle[^\d]*.*\s*(.*) | |
Pinnacle[^\d]*.*\s*.*\s*(.*) | |
//---------------------------------------------------------------------------------- | |
// Code to expand the Asian Handicap -0.25 section (edit for other asian handicap values | |
//---------------------------------------------------------------------------------- | |
els = document.getElementsByClassName('flex w-full items-center'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].innerText.includes('Asian Handicap -0.25')) { | |
els[i].click(); | |
break; | |
} | |
} | |
//--------------------------------------------------------------------------- | |
// Mouse Over for Pinnacle Home Opening Odds | |
// hda = 1 means home opening | |
// Change hda = 2 for Draw and hda = 3 for Away opening odds | |
// Change bookmaker as per requirement | |
//--------------------------------------------------------------------------- | |
hda = 1; | |
bookmaker= 'Pinnacle'; | |
els = document.getElementsByClassName('flex'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].innerText.startsWith(bookmaker) && els[i].innerText.endsWith(`%`)) { | |
el = els[i].children[hda].children[0]; | |
event = new Event('mouseover'); | |
el.dispatchEvent(event); | |
break; | |
} | |
} | |
//--------------------------------------------------------------------------- | |
// RegEx to get opening odds | |
//--------------------------------------------------------------------------- | |
Opening odds:\r\n.*\r\n(.*) | |
//--------------------------------------------------------------------------- | |
// Mouse Over for Asian Handicap Opening Odds for bet365 | |
// hda = 2 means Asian Handicap 1 | |
// hda = 3 means Asian Handicap 2 | |
// Change bookmaker as per requirement | |
//--------------------------------------------------------------------------- | |
hda = 2; | |
bookmaker= 'bet365'; | |
els = document.getElementsByClassName('flex'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].innerText.startsWith(bookmaker) && els[i].innerText.endsWith(`%`)) { | |
el = els[i].children[hda].children[0]; | |
event = new Event('mouseover'); | |
el.dispatchEvent(event); | |
break; | |
break; | |
} | |
} | |
//--------------------------------------------------------------------------- | |
// Mouse Over for Half Time / Full Time Opening Odds for 1xBet | |
// Change bookmaker name as per requirement | |
//--------------------------------------------------------------------------- | |
bookmaker= '1xBet'; | |
els = document.getElementsByClassName('flex w-full'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
if(els[i].innerText.startsWith(bookmaker)) { | |
el = els[i].parentElement; | |
el = el.children[el.childElementCount-1]; | |
el = el.children[0]; | |
event = new Event('mouseover'); | |
el.dispatchEvent(event); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment