Get API link in Viewer

Currently we can set API link only manually. So, this PR provide some functional that help us get API link directly from Viewer.
And this provide cookie hack that let us get API link without any proxy/VPN!

Code may be looks a ugly but I don't know other workarounds for getting loadFinished-signal from specific frame/iframe (that contains HTML with swf and API data).

Because my english is poor - please check text in settings.
Is it really necessary to use a timer here? Is there no event you could listen for instead? When you make a computer move at human speeds, it's generally slower than necessary.