javascript - can't match a page with firefox jpm sdk page-mod inlclude -


i'm writing firefox addon, original greasemonkey userscript, replaces eztv site's links ajax ones, when click on show's watched/unwatched links sends ajax request eztv , removes row on success. everthing working fine, firefox's jpm sdk page-mod never matches site if specify include run on eztv sites.

require('sdk/page-mod').pagemod({ include: [/(https?:\/\/eztv\.(it|ch|ag)\/myshows)/, '*.eztv-proxy.net/myshows'], contentscriptwhen: 'ready', contentscriptfile: ["./jquery-2.2.3.min.js", './main.js'], contentstylefile: "./eztv.css", attachto: ["existing", "top"],     }); 

if change include: "*", scripts loaded fine. i've tested regexp , seams match https://eztv.ag/myshows without hich, how not work in addon.

can spot problem ?

finally found answer problem, regexp missing end slash. , if using string wildcard example: "*.eztv.it" cannot specify path or query match, matches domain names. if need match domains specific path need use regexp.


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -