honestbleeps/Reddit-Enhancement-Suite — pull request #806 by thybag (2014-03-03 18:52:20+00:00)
Title: Reduce calls to `toLowerCase()` in showImages module

Hello,

I noticed that pretty much every "site" module was making an independent call to `toLowerCase()` in its detect method. I'm not sure quite what the overhead of that would be, but since the majority of code is doing roughly the same thing in that respect i though it would make sense just to do it the once at the beginning, then pass the lower cased value on to the detect method directly.

I've avoided changing any of the modules that weren't explicitly lower casing the value, just to avoid any issues were sites use case sensitive values. From my local testing everything appears to be working as normal.