如何在manifest.json权限中包含多个TLD?

时间:2018-09-20 09:11:47

标签: google-chrome-extension

哪种方法是在Chrome扩展程序的manifest.json中包含以下网址(多个TLD)的最佳方法?我想包括:

>> array = range(50)
>> array
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]

>> import shuffle
>> shuffle(array)
>> array
[0, 32, 4, 35, 27, 40, 30, 7, 36, 24, 11, 26, 2, 45, 1, 41, 47, 5, 48, 18, 49, 20, 46, 44, 43, 31, 10, 42, 9, 13, 14, 15, 28, 29, 8, 6, 34, 19, 22, 33, 3, 17, 23, 38, 37, 16, 39, 21, 12, 25]

>> set(array)  # The data inside the set already seem to be sorted
set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])

>> list(set(array))  # The original array is sorted
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]

但是以下形式给出了错误:

https://www.corporate.com/
https://www.corporate.de/
https://www.corporate.co.uk/

因为匹配模式规则https://developer.chrome.com/apps/match_patterns表示该部分只能在开头包含*。

0 个答案:

没有答案
相关问题