tor-browser

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

file_link_hover.sjs (814B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2  * License, v. 2.0. If a copy of the MPL was not distributed with this
      3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 function handleRequest(request, response) {
      8   response.setHeader("Content-Type", "text/html", false);
      9   response.setHeader("Cache-Control", "no-cache", false);
     10 
     11   // Get the target URL from the query string
     12   const params = new URLSearchParams(request.queryString);
     13   const targetURL = params.get("target") || "about:blank";
     14 
     15   const html = `<!DOCTYPE html>
     16 <html>
     17 <head>
     18   <meta charset="UTF-8">
     19   <title>Link Hover Test</title>
     20 </head>
     21 <body>
     22   <h1>Link Hover Speculative Connection Test</h1>
     23   <a id="testLink" href="${targetURL}">Test Link</a>
     24 </body>
     25 </html>`;
     26 
     27   response.write(html);
     28 }