auto click button if style display is block : hello everyone i am totally new to this and i was just wondering is there away to auto click a button when style display is block?

i would really appreciate if someone can point me in the right direction.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <div id="advert" img="" style="display: block;">
    <div id="continueItems" class="text-center">
    <p> TEXT HERE</p>
    </div>
    <br>
    <div class="text-center">
    <button id="statsContinue" class="btn btn-primary text-center" data-itr="continue" onclick="closeStats();">Continue</button>
    </div>
    </div>


<!-- end snippet -->

