Java Script in web-resource not loading on Issue search and project view

Hi everyone,
I implemented a custom button that executes a JS function which calls a REST endpoint. It works fine in the normal Issue view, but not at all in the project view or the Issue search.

This is my button and the web resource in atlassian-plugin.xml:

    <web-item key="review_button" name="Reviewed" section="operations-top-level" weight="1">
        <label>Reviewed</label>
        <link linkId="review-link"/>
        <styleClass>aui-button toolbar-trigger</styleClass>
        <condition class="com.tsi.otc.jira2otip.common.conditions.ReviewButtonViewable"/>
    </web-item>

    <web-resource key="issue-resources" name="Issue Web Resources">
        <dependency>com.atlassian.auiplugin:ajs</dependency>
        <resource type="download" name="review.js" location="/js/review.js"/>
        <context>atl.general</context>
        <context>jira.browse.project</context>
        <context>jira.navigator.simple</context>
        <context>jira.navigator.advanced</context>
    </web-resource>
</atlassian-plugin>

I also already tried to set the context to general like this:
<context >atl.general</context>

It still only get’s executed in issue view but not in project view or the Issue search. What am I missing?

Against my initial assumption that I was using web-item or web-resource wrong, it actually had to do with the button not being fully rendered in the project view/ issue search and therefore the click event not working. I replaced:

    var $webItem = $('#review-link');
    $webItem.click(function() {

with

AJS.$(document).on("click","#review-link",function(){...

in my JS file. Hope it may helps someone with a similar issue.