removing untranslated string for non-human entities, moving insecure notice to template, so it can remains translated
This commit is contained in:
@@ -266,12 +266,7 @@
|
||||
if (isOldBrowser()) {
|
||||
// some browsers (Chrome based ones) would have webcrypto support if using HTTPS
|
||||
if (!isSecureContext()) {
|
||||
showError(
|
||||
'Your browser may require an HTTPS connection to support the WebCrypto API. Try <a href="%s">switching to HTTPS</a>.'.replace(
|
||||
'%s',
|
||||
'https' + window.location.href.slice(4)
|
||||
)
|
||||
);
|
||||
removeHiddenFromId('insecurecontextnotice');
|
||||
}
|
||||
removeHiddenFromId('oldnotice');
|
||||
init = true;
|
||||
|
||||
@@ -42,7 +42,8 @@ describe('Check', function () {
|
||||
isSecureContext = secureProtocol || !isDomain || tld.length > 0,
|
||||
clean = jsdom(
|
||||
'<html><body><div id="errormessage" class="hidden"></div>' +
|
||||
'<div id="oldnotice" class="hidden"></div></body></html>',
|
||||
'<div id="oldnotice" class="hidden"></div>' +
|
||||
'<div id="insecurecontextnotice" class="hidden"></div></body></html>',
|
||||
{
|
||||
'url': (secureProtocol ? 'https' : 'http' ) + '://' +
|
||||
(isDomain ? domain.join('') + tld : localhost) + '/'
|
||||
@@ -50,7 +51,7 @@ describe('Check', function () {
|
||||
);
|
||||
Legacy.Check.init();
|
||||
const result1 = Legacy.Check.getInit() && !Legacy.Check.getStatus(),
|
||||
result2 = isSecureContext === (document.getElementById('errormessage').className === 'hidden'),
|
||||
result2 = isSecureContext === (document.getElementById('insecurecontextnotice').className === 'hidden'),
|
||||
result3 = (document.getElementById('oldnotice').className !== 'hidden');
|
||||
clean();
|
||||
return result1 && result2 && result3;
|
||||
|
||||
Reference in New Issue
Block a user