tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

navigator-onLine.js (262B)


      1 if ('onmessage' in self) { // dedicated worker
      2  onmessage = function(e) {
      3    postMessage(navigator.onLine);
      4  }
      5 } else { // shared worker
      6  onconnect = function(e) {
      7    e.ports[0].onmessage = function(e) {
      8      this.postMessage(navigator.onLine);
      9    }
     10  }
     11 }