Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Add to anchor rel attributes do not overwrite

Gabe Kangas1d4308682d39
diff --git a/web/utils/no-link-referrer.ts b/web/utils/no-link-referrer.ts
index 9f3308fb1b..0d43ef9ce0 100644
--- a/web/utils/no-link-referrer.ts
+++ b/web/utils/no-link-referrer.ts
@@ -15,7 +15,9 @@ export default function setupNoLinkReferrer(observationRoot: HTMLElement): void
const config = { attributes: false, childList: true, subtree: true };
const addNoReferrer = (node: Element): void => {
- node.setAttribute('rel', 'noopener noreferrer ');
+ const existingAttributes = node.getAttribute('rel');
+ const attributes = `${existingAttributes} noopener noreferrer`;
+ node.setAttribute('rel', attributes);
};
// Callback function to execute when mutations are observed