tumpio / requestcontrol

A Firefox extension
https://addons.mozilla.org/addon/requestcontrol
Mozilla Public License 2.0
172 stars 25 forks source link

Default rule suggestion #145

Open r-flash opened 3 years ago

r-flash commented 3 years ago

I have noticed some links around the Internet where utm* parameters are in the hash. As a filter for utm* query parameters is already among the default rules, I suggest also adding something like this:

[
  {
    "uuid": "26e187d0-57c3-43f5-8744-37d7c470593f",
    "pattern": {
      "scheme": "*",
      "host": [
        "*"
      ],
      "path": [
        "*"
      ],
      "allUrls": true
    },
    "types": [
      "main_frame"
    ],
    "action": "redirect",
    "active": true,
    "title": "Remove%20utm_*%20from%20hash",
    "redirectUrl": "[hash={hash//utm_[^&]+&?/}]"
  }
]

(I would also appreciate advice if there is a more correct/optimal way to express this kind of filter :) )