Add a new data attribute or a special class to detect if we should hide the viewer button.
See https://moodle.org/mod/forum/discuss.php?d=434991