ray-lothian / UserAgent-Switcher

A User-Agent spoofer browser extension that is highly configurable
https://webextension.org/listing/useragent-switcher.html
Mozilla Public License 2.0
923 stars 143 forks source link

Problem parsing JSON config for "custom mode" #85

Closed dwaal closed 3 years ago

dwaal commented 4 years ago

{   "somedomain.com": "Mozilla/5.0 (Linux; Android 10; SM-G975U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36",   "someotherdomain.com": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15", }

In my tests, the last entry is ignored if I put a comma (see above) after the entry. The parser should handle this correctly with or without comma.

ray-lothian commented 4 years ago

The last entry cannot have ",". This is not a valid JSON. This extension uses JSON.parse method to validate.

Korb commented 1 month ago

@dwaal, jsonformatter.curiousconcept.com: 2024-07-29_22-34-30