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('', 'msn.com .nm.ru 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: