Reputation: 396
I am trying to analyze the codes of adblock plus and realized that it uses requireJS library to include files. But I can't find requireJS library to be able to use it in the extension.Why its not found in the extension folder? I'm stuck with no satisfactory explanation.am I missing something or doing wrong ?
Upvotes: 2
Views: 127
Reputation: 941
Look in the compat.js
file. You will see that require(module)
is just a function. Also, read the background.js
file for how with
keyword is used. More info about with
keyword here.
All the html files already have this file loaded in the scripts tag, hence this can be used everywhere.
So this is not the requireJS
library's require
that you are searching for.
I hope this helps.
Upvotes: 2
Reputation: 4825
If there is no local library in the extension folder, it's possible they are using a CDN, such as this one, to include what they need in their project
Upvotes: -1