Skip to content

Commit

Permalink
Add close buttons to http and pwfail warrnings
Browse files Browse the repository at this point in the history
I now believe every warning can be closed.
  • Loading branch information
alanhkarp committed Oct 23, 2023
1 parent 68c5f55 commit 5b2daef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ <h3>Settings Code</h3>
The connection to this page is not secure. Are you sure you want
to enter your password?
</p>
<button id="httpclose" type="button" style="width:40%"
title="Close">
<span class="btn-text" style="color: black">Close</span>
</div>
<div id="forget" class="warning nodisplay"
title="You can change your mind or permanently forget the settings for the listed domain names.">
Expand Down Expand Up @@ -617,6 +620,9 @@ <h3>Settings Code</h3>
pasword length, or reduce the number of special characters you're asking for. If
that doesn't work, try another nickname for the site.
</p>
<button id="pwfailclose" type="button" style="width:40%"
title="Close">
<span class="btn-text" style="color: black">Close</span>
</div>
<div id="bkmkcheck" class="warning nodisplay">
You can paste the URL for the login page to see if you might be at a fake site that is trying
Expand Down
10 changes: 9 additions & 1 deletion src/ssp.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ let SitePasswordWeb = ((function (self) {
const $specials = get("specials");
const $makedefaultbutton = get("makedefaultbutton")
const $downloadbutton = get("downloadbutton");
const $phishing = get("phishing");
// Fill in default values in case the user has changed them
let defaultsettings = SitePassword.getDefaultSettings();
loadSettingControls(defaultsettings);
Expand Down Expand Up @@ -418,6 +419,14 @@ let SitePasswordWeb = ((function (self) {
alert("Invalid bookmark. Copy it again?");
}
}
const $httpclose = get("httpclose");
$httpclose.onclick = function () {
get("http").style.display = "none";
}
const $pwfailclose = get("pwfailclose");
$pwfailclose.onclick = function () {
get("pwfail").style.display = "none";
}
const $bkmcheckclose = get("bkmkcheckclose");
$bkmcheckclose.onclick = function () {
get("bkmkcheck").style.display = "none";
Expand Down Expand Up @@ -696,7 +705,6 @@ let SitePasswordWeb = ((function (self) {
}, 0);
}

const $phishing = get("phishing");
$cancelwarning.onclick = function () {
$domainname.value = "";
enableBookmark();
Expand Down

0 comments on commit 5b2daef

Please sign in to comment.