Ishiro wrote:yeti_c wrote:TODO :
Confirm Buttons are a bit screwy!! <- I know why now too!!
C.
If you haven't done it yet, here is what I did for my rebuild of BOB that I have not finished.
- Code: Select all
//Override sendRequest
var newsendRequest = unsafeWindow.sendRequest;
unsafeWindow.sendRequest = function(command) {
/* --- Confirmation Popups --- */
if (((command == 'End Attacks' || command == 'End Fortification' || (command == 'Fortify' && !(dashboard.innerHTML.indexOf("Unlimited") > -1))) && myOptions['confirmEnds']) || (command == 'Auto-Attack' && myOptions['confirmAutoAttack']) || (command == 'Deploy' && myOptions['confirmDeploy']))
{
if (confirm("Are you sure?"))
{
return newsendRequest(command);
}
else {
return false;
}
}
else {
return newsendRequest(command);
}
}
Override the sendRequest function to intercept the calls.
Nice one... I tried doing something that didn't override this but I failed...
WIll slip this one in later...
C.