tor-browser

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

support.js (597B)


      1 function dirname(path) {
      2    return path.replace(/\/[^\/]*$/, '/')
      3 }
      4 
      5 /* This subdomain should point to this same location */
      6 var SUBDOMAIN = 'www1'
      7 var SUBDOMAIN2 = 'www2'
      8 var PORT = {{ports[http][1]}}
      9 //XXX HTTPS
     10 var PORTS = {{ports[https][0]}}
     11 
     12 /* Changes http://example.com/abc/def/cool.htm to http://www1.example.com/abc/def/ */
     13 var CROSSDOMAIN     = dirname(location.href)
     14                        .replace('://', '://' + SUBDOMAIN + '.')
     15 var REMOTE_HOST     = SUBDOMAIN + '.' + location.host
     16 var REMOTE_PROTOCOL = location.protocol
     17 var REMOTE_ORIGIN   = REMOTE_PROTOCOL + '//' + REMOTE_HOST