MyCheapPhone

URLCheck-PatternChecker.json

Nov 28th, 2024 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.76 KB | Source Code | 0 0
  1. {
  2.   "Warning! Non-ASCII characters found.": {
  3.     "regex": "[^\\p{ASCII}]"
  4.   },
  5.   "HTTP link. Consider using HTTPS.": {
  6.     "regex": "^http:\/\/",
  7.     "replacement": "https:\/\/"
  8.   },
  9.   "Missing HTTP scheme.": {
  10.     "regex": "^(?!.*:)",
  11.     "replacement": "http:\/\/$0"
  12.   },
  13.   "Missing HTTPS scheme.": {
  14.     "regex": "^(?!.*:)",
  15.     "replacement": "https:\/\/$0"
  16.   },
  17.   "Invalid http scheme capitalization.": {
  18.     "regex": "^(?!http:)[hH][tT]{2}[pP]:(.*)",
  19.     "replacement": "http:$1",
  20.     "automatic": "true"
  21.   },
  22.   "Invalid https scheme capitalization.": {
  23.     "regex": "^(?!https:)[hH][tT]{2}[pP][sS]:(.*)",
  24.     "replacement": "https:$1",
  25.     "automatic": "true"
  26.   },
  27.   "Reddit ➔ Redlib": {
  28.     "regex": "^https?:\/\/(?:[a-z0-9-]+\\.)*?reddit.com\/(.*)",
  29.     "replacement": "https:\/\/farside.link\/redlib\/$1",
  30.     "enabled": "true"
  31.   },
  32.   "X ➔ Nitter": {
  33.     "regex": "^https?:\/\/x.com\/(.*)",
  34.     "replacement": [
  35.       "https:\/\/xcancel.com\/$1",
  36.       "https:\/\/nitter.poast.org\/$1",
  37.       "https:\/\/nitter.privacydev.net\/$1"
  38.     ],
  39.     "enabled": "true"
  40.   },
  41.   "YouTube Desktop": {
  42.     "regex": "^https?:\/\/(?:[a-z0-9-]+\\.)*?youtube.com\/watch\\?v=(.*)",
  43.     "replacement": [
  44.       "https:\/\/youtube.com\/v\/$1"
  45.     ],
  46.     "enabled": "true"
  47.   },
  48.   "Youtube ➔ Invidious": {
  49.     "regex": "^https?:\/\/(?:[a-z0-9-]+\\.)*?youtube.com\/(.*)",
  50.     "replacement": [
  51.       "https:\/\/yewtu.be\/$1",
  52.       "https:\/\/farside.link\/invidious\/$1"
  53.     ],
  54.     "enabled": "false"
  55.   },
  56.   "Google Translate": {
  57.     "regex": "^https?:\/\/(?!([a-z0-9-]+\\.)?(google\\.com|translate\\.goog|.*\\.us$))",
  58.     "replacement": [
  59.       "https:\/\/translate.google.com\/translate?sl=auto&tl=en&hl=en&u=$0"
  60.     ],
  61.     "enabled": "true"
  62.   }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment