The (lower level) match pattern API is built into the (higher level) PageMod API in the form of the include
property in the constructor. The only reason the match-pattern module is linked to in the PageMod docs is so that you have an idea of how the matching strings work.
So if want your add-on to be applied to "http://example.com/*"
, main.js should look like:
var {data} = require("sdk/self");
var pageMod = require("sdk/page-mod");
pageMod.PageMod({
include: "http://example.com/*",
contentScriptFile: [data.url("jquery-1.11.0.js"), data.url("my-script.js")]
});
If I misinterpreted that (the match-pattern lines were in there for another reason), and you want your regex to be applied to every page, use include: '*'
.