vendredi 9 août 2019

how can a chrome extension check if the website currently on has a specific javascript attached to it in the header

I want to have my chrome extension check if the the dom contains a script called PDF.js.

I have tried :

document.head.getElementsByTagName("script").getAttribute("src")

and compared this with the address that I know the js script was assigned to by the html (in the header) here:

<header>
<base href="resource://pdf.js/web/">
<script src="../build/pdf.js"></script>

Is there an easier way to see if the website is using a specific js file?




Aucun commentaire:

Enregistrer un commentaire