Disconnected from websocket
#2
(2016-03-05, 17:38)DelandeC Wrote: Hi folks,

Am I the only one who think this is too sad to be disconnected from the blitzortung websocket when I'm not on the window of blitzortung.  Undecided

It is impossible to have a dual screen with the map on one display and an other thing on the main display.  Sad

Regards

You can fix this with Greasemonkey.

I am sure they put the code the to reduce bandwidth taken up by hidden tabs and minimized windows.

I am not sure how the devs will feel about people doing this, but the script is below.


Code:
// ==UserScript==
// @name        Blitzortung Map Always Update
// @namespace   http://en.blitzortung.org/
// @description Makes onblur set isFocus true or loadstrikes.
// @include     http://en.blitzortung.org/live_dynamic_maps.php
// @version     1
// @grant       none
// ==/UserScript==

window.onfocus= function() {
 if (!(isFocused)) {
   isFocused = true;
   if ((!(ws === undefined))&&(ws.readyState == 1)) {
     ws.send('{}');
   }
   else {
     loadStrikes(map,true,false);
   }
 }
};

window.onblur= function() {
 if (!(isFocused)) {
   isFocused = true;
   if ((!(ws === undefined))&&(ws.readyState == 1)) {
     ws.send('{}');
   }
   else {
     loadStrikes(map,true,false);
   }
 }
};
Reply


Messages In This Thread
Disconnected from websocket - by DelandeC - 2016-03-05, 17:38
RE: Disconnected from websocket - by kevinmcc - 2016-03-06, 00:03
RE: Disconnected from websocket - by Egon - 2016-03-06, 09:14
Disconnected from websocket - by DelandeC - 2016-03-06, 09:22
RE: Disconnected from websocket - by Egon - 2016-03-06, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)