Commit 3b1c9885 authored by Malte Jürgens's avatar Malte Jürgens Committed by Pier Angelo Vendrame
Browse files

Bug 1850200 - Add delay to HTTPS-Only "Continue to HTTPS Site" button r=freddyb

parent 80c22ab6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,7 @@
        <button
        <button
          id="openInsecure"
          id="openInsecure"
          data-l10n-id="about-httpsonly-button-continue-to-site"
          data-l10n-id="about-httpsonly-button-continue-to-site"
          inert
        ></button>
        ></button>
      </div>
      </div>
      <div class="suggestion-box" hidden>
      <div class="suggestion-box" hidden>
+5 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,11 @@ function initPage() {
    .getElementById("openInsecure")
    .getElementById("openInsecure")
    .addEventListener("click", onOpenInsecureButtonClick);
    .addEventListener("click", onOpenInsecureButtonClick);


  const delay = RPMGetIntPref("security.dialog_enable_delay", 1000);
  setTimeout(() => {
    document.getElementById("openInsecure").removeAttribute("inert");
  }, delay);

  if (window.top == window) {
  if (window.top == window) {
    document
    document
      .getElementById("goBack")
      .getElementById("goBack")
+1 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,7 @@ export let RemotePageAccessManager = {
    },
    },
    "about:httpsonlyerror": {
    "about:httpsonlyerror": {
      RPMGetFormatURLPref: ["app.support.baseURL"],
      RPMGetFormatURLPref: ["app.support.baseURL"],
      RPMGetIntPref: ["security.dialog_enable_delay"],
      RPMSendAsyncMessage: ["goBack", "openInsecure"],
      RPMSendAsyncMessage: ["goBack", "openInsecure"],
      RPMAddMessageListener: ["WWWReachable"],
      RPMAddMessageListener: ["WWWReachable"],
      RPMTryPingSecureWWWLink: ["*"],
      RPMTryPingSecureWWWLink: ["*"],