User talk:Technical 13/SandBox/getPageViews.js

Calling for help
can one of you help me understand how callbacks work? I have the hardest time understanding them, as is evident by this and a few other stalled ideas of mine. It's not like I can chain things together with .done statements, as those don't seem to work in the older version of jQuery that we are using. How do I force the script to process parts of the script before or after others. I want to be able to have it process all of the parts that gather information from APIs first, obviously, and then format/process/decided how to offer that information after. Can someone tweak this script so that this happens, or tell me how to do it (preferred), and if you do it yourself, tell me why yours worked and why mine wasn't. Thanks. Technical 13 (talk) 21:18, 19 January 2014 (UTC) Hey :) It looks like right now stats.grok.se blocks cross-origin resource sharing. I've emailed Henrik and asked him to fix this, but really it should just be moved to labs (maybe we can work on that?). Here is a version of the script that will probably work when it gets fixed. Take a look and see if you can figure out what it's doing -- then I'll be happy to answer questions as well! (I just don't want to re-explain things you already understand.)  Theopolisme ( talk )  03:43, 20 January 2014 (UTC)
 * I almost forgot to mention, since stats.grok.se is not using https, you will run into the script being blocked because it is mixed mode unless you either disable the block (I know it can be done on about:config in firefox, not sure about other browsers.) or you manage to force your way to the http version of Wikipedia. This will be a major "issue" for this script until someone takes the time to recode stats.grok.se on labs or something so it can be https.  (I'm looking into trying to do itmyself, but have little understanding of how to write tools on labs at the moment.  Hopefully I can get  or someone else that knows how such a thing might be written to help me.  I know that I'll be able to get all of the information for it from http://dumps.wikimedia.org/other/pagecounts-raw/.  Anyways, thanks for any help I can get. Technical 13 (talk) 22:20, 19 January 2014 (UTC)
 * , I've told my browser to ignore that and had the script actually returning results (albeit too late). I've tried your script, and a screenshot of the results can be seen on commons --> commons:File:Theo's stats script screenshot.png.  Your version doesn't seem to be getting any results back or there is something else funky going on I am missing.  Thanks! Technical 13 (talk) 17:00, 20 January 2014 (UTC)