exclude_globs和exclude_matches在chrome扩展中不起作用

时间:2019-01-25 15:57:02

标签: google-chrome google-chrome-extension google-chrome-devtools manifest

我尝试在扩展程序中使用exclude_globs和exclude_matches。 细节: 内容脚本之一必须在除abc.co.in之外的所有URL上运行。 为此,我在排除匹配项中添加了abc.co.in,如下所示。

interface IAmNotOptional {
  optional: string;
  optional2: string;
  forced: string;
}

class A {
  all: IAmNotOptional = { forced: 'forced' }; // error
  some: Partial<IAmNotOptional> = { forced: 'forced' }; // no error
  none: Partial<IAmNotOptional> = { }; // no error, but perhaps undesirable behaviour
}

但是脚本1.js在abc.co.in上执行。

我尝试了如下的exclude_globs

char[][] letters = {
    {'a','e','i','o','u','l','n','s','t','r'},
    {'d','g'},
    {'b','c','m','p'},
    {'f','h','v','w','y'},
    {'k'},
    {'j','x','q','z'}
};

for(int i= 0; i < letters[0].length; i ++)
{
    System.out.println(letters[1][i]);
}

但是它不起作用。当我删除?co?in(exclude_globs仅具有“ abc ”)时,它可以工作,但要求脚本仅在URL具有abc.co.in且具有abc时才应执行。 com,它必须执行。

请问您对此有何建议? 我正在使用清单版本2。

0 个答案:

没有答案