It's not guaranteed that the Media folder will be selected correctly by the CSS selector, so I would suggest using jQuery instead and creating media-menu.js in the assets/js folder:
$(document).ready(function() {
$('li:contains("Media")').css('display', 'none');
});
...and amending Plugin.php
if (isset($preferences['media_menu']) && $preferences['media_menu']) {
$controller->addJs('/plugins/indikator/backend/assets/js/media-menu.js');
}
Last updated