L
L
leaningless2017-02-25 19:43:54
JavaScript
leaningless, 2017-02-25 19:43:54

How to add a button to call a script in a Chrome extension?

I packed the extension according to the instructions based on the archive (template), found a working example of adding a button to open a link to the extension's pop-up menu:

<a href="Ссылка на сайт" target="_blank">
 <button>
 <center>
 Название сайта
 </center>
 </button>

But I don’t know how to add a button to call a JS script, which I usually call from the browser console:
$('.class').each(function (counter, thing) {
    ...
    temp.click();
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question