[MM-63325, MM-63329] feat: dont register plugins or show the footer if MMEMBED cookie is set to 1 (#30393)

* feat: no-op register plugin if MMEMBED=1
* feat: disable footer links when MMEMBED=1
Этот коммит содержится в:
Felipe Martin
2025-03-03 17:24:24 +01:00
коммит произвёл GitHub
родитель 854011cf77
Коммит 255e1a8ac1
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@@ -15,6 +15,11 @@ const Footer = () => {
const {AboutLink, PrivacyPolicyLink, TermsOfServiceLink, HelpLink} = useSelector(getConfig);
// Check if MMEMBED cookie is set and if so, don't show the footer
if (document.cookie.includes('MMEMBED=1')) {
return null;
}
return (
<div className='hfroute-footer'>
<span

Просмотреть файл

@@ -62,6 +62,11 @@ window.plugins = {};
// During the beta, plugins manipulated the global window.plugins data structure directly. This
// remains possible, but is officially deprecated and may be removed in a future release.
function registerPlugin(id: string, plugin: Plugin): void {
// Don't register plugins if MMEMBED cookie is set
if (document.cookie.includes('MMEMBED=1')) {
return;
}
const oldPlugin = window.plugins[id];
if (oldPlugin && oldPlugin.uninitialize) {
oldPlugin.uninitialize();