perf: links to cross-origin destinations are unsafe
Add `ref=noopener` to the `a.goog-logo-link` tag to solve the issue found out by Chrome lighthouse.
This commit is contained in:
parent
5c4c473b88
commit
78f2d77170
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@ function googleTranslateElementInit() {
|
|||
layout: google.translate.TranslateElement.InlineLayout.VERTICAL
|
||||
}, 'google_translate_element');
|
||||
|
||||
// Links to cross-origin destinations are unsafe
|
||||
var gll = document.getElementsByClassName('goog-logo-link')[0];
|
||||
if (gll) {
|
||||
gll.setAttribute('rel', 'noopener');
|
||||
}
|
||||
|
||||
function restoreLang() {
|
||||
var iframe = document.getElementsByClassName('goog-te-banner-frame')[0];
|
||||
if (!iframe) return;
|
||||
|
|
Loading…
Reference in a new issue