Answer the question
In order to leave comments, you need to log in
How to add custom code before page load using chrome extension?
I need to add a button on a website using a google chrome extension. It is necessary that the button starts to be displayed before the page is fully loaded. How to do it?
Now I do this - I load the js file to this site:
$(function () {
if ($(location).attr('pathname').search('(prd/)') != -1) {
$("div[id=shipping-restrictions]").after('<div id="forprices"><button id="startBtn" onClick="this.disabled=\'true\'" type="button" class="buttonFunc">Start</button></div>`);
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question