Board Thread:Code Review/@comment-3328029-20150728140056/@comment-3328029-20151201203856

I updated the script (V1.1.7) and it now includes a real-time options panel (in the fashion of that used by normal Special:RecentChanges). I also included support for url variables (exact same support as found on Special:RecentChanges).

A) So I originally had some issues figuring out how to best "structure" these changes, so figured I'd see if anyone had any thoughts on my reasoning:
 * 1) RC params "order of specificity" when set in 2+ places that effect same wiki(s).
 * 2) Saving "options panel" settings. I've considering using a cookie (with a reset/remove option), but not sure if that's a good idea or not (since it's kinda on the same "level" as "data-params" although it is a bit more specific).
 * 3) *I've considered having there be options, such as no saving [default], cookie, and altering url (basically works like a normal RC page; only "downside" to doing it by default is a page can have more than 1 RCM and this would effect them all).
 * 4) data-hideusers conflicts with hidemyself=1. While different "entities", data-hideusers can contain your own username. so even if you toggle hidemyself, it overrides it. I "fixed" this by disabling the "hidemyself" toggle on options panel when this happens, but I'm not sure if this is most logical solution.
 * 5) Originally I had planned on adding a "&username=" option to allow "hidemyself=1" to work nicely on non-wiki wikis (currently it assumes wikia username), but forgot to put it in until recently. The biggest issue I have with this solution (and probably why I didn't add it), is this would make any user viewing the RCM labeled as that username. One solution is (on a user's JS page) to have a dynamic array of wikis and usernames that go with them. But this adds a whole extra level of complexity, that's probably unnecessary since things like "data-hideusers" already kinda make the script intended more for user-specific RCMs versus "public" RCMs (which I've never really seen done anyways). Another solution is to just disable hidemyself on external wikis by default (making a "public" use more logical), while having "&username=" change it for user-specific use. Thoughts?

B) Some questions I'm curious if anyone knows the answer to:
 * 1) Using the recentchnages api, is there a way to find if a change is the most recent version (the "live" version) for that page without performing a second check for each article? (the newest edit on RCM might not be live version due to RC options hiding changes) I've tried messing with the API to do this, but can't figure it out.
 * 2) I'd like to add "patrol" support for the script, but this info can only be retrieved if you have the privileges. However, even if I check if a user has a privilege, I'm not able to figure out how to request it as that user (or if I even can due to cross origin). And since requesting patrols without the correct right causes no RCs to be returned, it would have to be correct, like, always.
 * 3) This script is large, so would it be "worth" having code.2.js only have ~50 lines of code that check if the script should be activated, which then loads the rest of the codebase, or does caching make this fairly pointless (since caching does, well, caching, and since this script rarely seems to be used wiki-wide).

Offhand aside: Since I have script options on the page (to help avoid wiki-wide vs user script conflicts, allow different RCMs to run on a wiki / page, as well as ease of quickly changing it), I originally came up with the dataset / "&wikispecificvar=" setup I have now for RCM / wiki-specific options. However, it's a bit messy (and dataset are hidden unless in source), so I was curious if anyone had some ideas to set it up nicer (like maybe a table instead of a list?).

Anyways, thoughts welcome! This script is fairly large (and definitely not perfect) so advice appreciated. I do some "weird" things out of preference (like sometimes using vanilla JS when jQuery might be a little simpler), but will gladly tweak something to increase performance / make sure my script plays nicely with other scripts on dev.

As I mentioned previously I use sublime text and code folding to navigate my code, so reading it in the wikia editor will suck.