Added more default replacements (AMP)

master
tastytea 4 years ago
parent 73ddaf2776
commit 3a44361bf7
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
  1. 6
      src/url.cpp

@ -111,12 +111,14 @@ const void init_replacements()
Json::Value &config = configfile.get_json();
if (config["replace"].isNull())
{
const std::array<const replace_pair, 5> replace_array =
const std::array<const replace_pair, 6> replace_array =
{{
{ "[\\?&]utm_[^&]+", "" }, // Google
{ "[\\?&]wt_?[^&]+", "" }, // Twitter?
{ "[\\?&]__twitter_impression=[^&]+", "" }, // Twitter?
{ "//amp\\.", "//" } // AMP
{ "//amp\\.", "//" }, // AMP
{ "/amp/", "" }, // AMP
{ "[\\?&]service=amp", "" } // AMP
}};
for (const replace_pair &pair : replace_array)

Loading…
Cancel
Save