snipe / downworthy

Source code for the Downworthy plugin
http://downworthy.snipe.net
208 stars 70 forks source link

Additional cleanup to excellent pull request to make simpler #32

Closed uberbrady closed 10 years ago

uberbrady commented 10 years ago

I just stole @nimishgautam 's pull request, and threw a little bit of simple-juice on it.

Instead of loading the dictionary as JSON, it's now just a JS file. This way you can include comments, etc - as per his suggestion. I think we may also want to be able to use JS Regex literals at some point - though to do that I'd like to change a little about the format of the dictionary file. Maybe for later. Those regex literals would only be valid in JS, not JSON.

I load up the dictionary into the background page, and now a lot of the parsing logic just "goes away".

This also allows us to get rid of "eval" permission.

nimishgautam commented 10 years ago

Nicely done =)