Skip to content

Commit

Permalink
Bug 1651197: Added Learn More link to HTTPS-Only Mode error page. r=c…
Browse files Browse the repository at this point in the history
…kerschb,fluent-reviewers,flod

Differential Revision: https://phabricator.services.mozilla.com/D86593
  • Loading branch information
JulianGaibler committed Aug 11, 2020
1 parent 9550d9a commit 0cbb1af
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions toolkit/components/httpsonlyerror/content/errorpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ <h1 class="title-text" data-l10n-id="about-httpsonly-title"></h1>
<li data-l10n-id="about-httpsonly-explanation-nosupport"></li>
<li data-l10n-id="about-httpsonly-explanation-risk"></li>
</ul>
<p class="learn-more-container">
<a id="learnMoreLink" data-l10n-id="about-httpsonly-link-learn-more"></a>
</p>
<div class="button-container">
<button id="goBack" class="primary" data-l10n-id="about-httpsonly-button-go-back"></button>
<button id="openInsecure" data-l10n-id="about-httpsonly-button-accept-and-continue"></button>
Expand Down
5 changes: 5 additions & 0 deletions toolkit/components/httpsonlyerror/content/errorpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ function initPage() {
{ websiteUrl: pageUrl.host }
);

const baseSupportURL = RPMGetFormatURLPref("app.support.baseURL");
document
.getElementById("learnMoreLink")
.setAttribute("href", baseSupportURL + "https-only-prefs");

document
.getElementById("openInsecure")
.addEventListener("click", onOpenInsecureButtonClick);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ about-httpsonly-explanation-risk = It’s also possible that an attacker is invo
about-httpsonly-button-accept-and-continue = Accept the Risk and Continue
about-httpsonly-button-go-back = Go Back
about-httpsonly-link-learn-more = Learn More…
1 change: 1 addition & 0 deletions toolkit/modules/RemotePageAccessManager.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ let RemotePageAccessManager = {
RPMAddToHistogram: ["*"],
},
"about:httpsonlyerror": {
RPMGetFormatURLPref: ["app.support.baseURL"],
RPMSendAsyncMessage: ["goBack", "openInsecure"],
},
"about:certificate": {
Expand Down
4 changes: 4 additions & 0 deletions toolkit/themes/shared/aboutHttpsOnlyError.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ em {
font-weight: 600;
}

.learn-more-container {
margin-block-start: 2rem;
}

.button-container {
display: flex;
flex-flow: row wrap;
Expand Down

0 comments on commit 0cbb1af

Please sign in to comment.