fix: open external links in default browser from macOS PWA…

…by using `window.open(url, "_blank", "noopener")` directly instead of a
now-rarely-needed workaround.

Fixes freeCodeCamp/devdocs#2438
pull/2439/head
Calum Smith 3 days ago
parent bcf7dc268c
commit d426b47166
No known key found for this signature in database
GPG Key ID: 6B076A5EA54D38B7

@ -457,13 +457,13 @@ $.noop = function () {};
$.popup = function (value) {
try {
window.open(value.href || value, "_blank", "noopener");
} catch (error) {
const win = window.open();
if (win.opener) {
win.opener = null;
}
win.location = value.href || value;
} catch (error) {
window.open(value.href || value, "_blank");
}
};

Loading…
Cancel
Save