tor-browser

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

imported-sw.js (299B)


      1 'use strict';
      2 
      3 import {routerRules} from './router-rules.js';
      4 
      5 const params = new URLSearchParams(location.search);
      6 const key = params.get('imported-sw-router-key');
      7 
      8 if (key) {
      9  self.addEventListener('install', async e => {
     10    await e.addRoutes(routerRules[key]);
     11    self.skipWaiting();
     12  });
     13 }