I am using the pdf_reader module and showing my PDF on the node. Now, I am supposed to hide the download button. For this purpose, I wrote the below javascript file:
jQuery(document).ready(function($) {
document.querySelector('#download').style.display = 'none';
});
It's also in my theme's libraries.yml file. The last thing I did was write a hook_preprocess_node implementation and put in the below code:
$node = \Drupal::routeMatch()->getParameter('node');
if ($node->getType() == 'e_dergi') {
$variables['#attached']['library'][] = 'conference_lite/custom';
}
But I can't hide the download button for the life of me. What else should I try?