tor-browser

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

profile_cleanup.js (1110B)


      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 window.attachEvent("onload", function () {
      6  // Set text direction.
      7  var direction = external.getTextDirection();
      8  var profileRefreshForm = document.getElementById("profileRefreshForm");
      9  profileRefreshForm.style.direction = direction;
     10  var checkboxLabel = document.getElementById("checkboxLabel");
     11 
     12  // Get this page's static strings.
     13  document.getElementById("header").innerText =
     14    external.getUIString("cleanup_header");
     15  document.getElementById("refreshButton").innerText =
     16    external.getUIString("cleanup_button");
     17  checkboxLabel.innerText = external.getUIString("cleanup_checkbox");
     18 
     19  // Set up the confirmation button.
     20  profileRefreshForm.attachEvent("onsubmit", function () {
     21    var doProfileCleanup = document.getElementById("refreshCheckbox").checked;
     22    external.gotoInstallPage(doProfileCleanup);
     23    return false;
     24  });
     25 
     26  document.getElementById("refreshButton").focus();
     27 });