chrome extension inject html 1

chrome extension inject html

$.get(chrome.runtime.getURL('/template.html'), function(data) {
  
    $(data).appendTo('body');
  
});

Here is what the above code is Doing:
1. It’s loading the template.html file from the extension’s folder.
2. It’s appending the template.html file to the body of the page.

Now, let’s add the following code to the content.js file:

Similar Posts