AcManager.Pages.Drive.Srs.SrsMainOld C# (CSharp) Method

SrsMainOld() private method

private SrsMainOld ( ) : void
return void
        private void SrsMainOld() {
            /* Old SRS (let’s keep it for now just in case) */
            WebBrowser.Execute(@"
/* User is not registered to any race yet, hide params */
var b = document.querySelector('[onclick*=""REMOTE/REQUESTED_CAR""]');
if (!b){
    window.external.SetParams(null);
    return;
}

/* Set next race params */
var o = {};
b.getAttribute('onclick').replace(/\/\/setsetting\/race\?(\w+\/\w+)=([^']*)/g, function(_, k, v){ o[k] = v == '' ? null : v; });

try {
    o['time'] = +b.parentNode.querySelector('script').innerHTML.match(/time:(\d+)/)[1];
} catch(e){}

try {
    if (b.value == 'Quit'){
        o['quit'] = location.host + '/' + b.getAttribute('onclick').match(/'(?:\.\/)?([^']*unregsrs[^']+)'/)[1];
    }
} catch(e){}

window.external.SetParams(JSON.stringify(o));

b.removeAttribute('onclick');
b.addEventListener('click', function (){
    window.external.Go();
}, false)", true);
        }