Tutorial: Browser management

Browser management

If necessary, the size of the browser window can be reduced and its position on the screen changed.
To do so call the following functions:

// offsets the window to the position with the coordinates x and y
window.moveTo(x, y);

// sets the window width and height values
window.resizeTo(width, height);

At any time you can access the current screen geometry:

console.log('window.screen.width:', window.screen.width);
console.log('window.screen.height:', window.screen.height);

Set web proxy configuration with operation check status:

if ( !stbBrowser.setProxy('http://16.16.16.16:3128', 'msn.com .nm.ru 10.0.0.1/24 192.168.2.*') ) {
    console.log('Was not able to set proxy configuration!');
}

Get browser current web proxy configuration:

console.log('proxy address:', stbBrowser.proxy);
console.log('proxy exclude list (delimited by spaces):', stbBrowser.proxyExcludeList);

Disable sending all requests through proxy and start sending them directly:

stbBrowser.resetProxy();