#!/bin/bash

# MobileFrontend - fix manifest
sed -i '/MFStopMobileRedirectCookieSecureValue/c\
    "MFManifestDisplay": {\
    "value": "standalone"\
    },\
    "MFStopMobileRedirectCookieSecureValue": {' /var/www/html/extensions/MobileFrontend/extension.json \

sed -i 's/$resultObj->addValue( null, 'display', 'minimal-ui' );/$resultObj->addValue( null, 'display', $config->get( 'MFManifestDisplay' ) );/' /var/www/html/extensions/MobileFrontend/includes/Api/ApiWebappManifest.php