test
This commit is contained in:
parent
75e1571b90
commit
e4257a953d
|
@ -13,7 +13,7 @@ function fetchFromURL(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var data = fetchFromURL('https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/data.json');
|
var data = fetchFromURL('https://raw.githubusercontent.com/KevinRoebert/ClearUrls/master/data/data.json') || [];
|
||||||
var providers = [];
|
var providers = [];
|
||||||
// ##################################################################
|
// ##################################################################
|
||||||
|
|
||||||
|
@ -200,6 +200,9 @@ function createProviders()
|
||||||
//Create new provider
|
//Create new provider
|
||||||
providers.push(new Provider(data.providers[p],data.providers[p].completeProvider));
|
providers.push(new Provider(data.providers[p],data.providers[p].completeProvider));
|
||||||
|
|
||||||
|
//Add URL Pattern
|
||||||
|
providers[p].setURLPattern(data.providers[p].urlPattern);
|
||||||
|
|
||||||
//Add rules to provider
|
//Add rules to provider
|
||||||
for(var r = 0; r < data.providers[p].rules.length; r++)
|
for(var r = 0; r < data.providers[p].rules.length; r++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"providers": {
|
"providers": {
|
||||||
"amazon": {
|
"amazon": {
|
||||||
"urlPattern": "",
|
"urlPattern": "(https:\\/\\/||http:\\/\\/).*(\\.amazon\\.)\\w{2,}\\/.*",
|
||||||
"completeProvider": true,
|
"completeProvider": true,
|
||||||
"rules": [
|
"rules": [
|
||||||
"pf_rd_[a-zA-Z]=[a-zA-Z0-9\\-\\.\\_]*[\\?|&]?",
|
"pf_rd_[a-zA-Z]=[a-zA-Z0-9\\-\\.\\_]*[\\?|&]?",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user