User talk:Kanegasi

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Please click here to start a new topic

Edit counter script[edit]

Hey, just wanted to say I enjoyed your story about how my script got you into wiki scripting. :D Thanks for fixing up compatibility issues so more people can use it. Cheers! — Bility (talk) 23:43, 1 April 2013 (UTC)[reply]

Oh wow, I'm truly honored to hear from you. I'm glad to see you like my work on your script. I will get it to produce exactly what your original table looks like, eventually. Thank you :D Kanegasi C 03:12, 2 April 2013 (UTC)[reply]

Found a bug with your edit counter script![edit]

Hi, I was originally working on fixing the namespace limiting bug with the original stratwiki version by Najzere when I stumbled upon your chat on his page... Decided I would see how yours ran and I found a bug! See the error caused by " " in my name. I would love to work with you on refining this script further. You can see the version I was working on User:Technical 13/Scripts/Edit counter.js where all I had managed to do so far was get rid of the alert telling people to bug Najzere if it didn't work on their wiki, made it work for 'confirmed' or 'autoconfirmed' (there are a few cases of one but not the other) (thinking about checking for 'skipcaptcha' right instead so this works better on other wikis), added some TRON lines with formatting to be have an idea of what section my modifications were causing the script to hang when it loaded, and finally I temporarily disabled the table with actual results and opted for a list that returns NS### and name trying to get the ns limitation thing worked around. I'll watch your talk page here, let me know if you would like to work on this together... Thanks. Technical 13 (talk) 14:37, 10 April 2013 (UTC)[reply]

I was thinking of working on getting all namespaces myself since I'm working in the Module space a bit now, which isn't counted. It shouldn't be too hard, now that I know a bit more about wiki scripting than when I first wrote it in the beginning of 2010. But I'll see what you guys come up with. Looking forward to checking out your improvements. :D — Bility (talk) 15:22, 10 April 2013 (UTC)[reply]
I made sure everything in the api calls were escaped, but didn't escape the username in the contrib links lol. Fixed on v75.
As for the higher namespaces, that was a simple fix. Remove this:
if(siResponse.query.namespaces[ns].id != namespaces.length)
            break;
This was forcing the script to ignore the namespace if its number was higher than the sum of the total namespaces retrieved. If you noticed on your test with my script, it caught your one Portal talk contribution. I'm not sure if Najzere(Bility)'s original counting method would work with removing that line though. The original count method was to request from the API each specific namespace. The issue I ran into is that it wasn't handling the API limit well. At the time, I wasn't an admin on Minecraft Wiki and when my main contribs went past 500, the script would error out on that namespace and not show anything in the table. I then converted the counting method to a complete API request that goes down the list of contribs in one piece and it increments each namespace count in the array, which allowed it to count past 500 on any namespace since I knew the query continue was working this way.
In response to the captcha checks, autoconfirmed is a default user right with the 10 total edit setting also default, but since I'm using a regex function to search user rights, I changed that to search for the word "confirmed" which should make it ambiguous enough to work elsewhere. Now at v76. Kanegasi C 18:40, 10 April 2013 (UTC)[reply]
Removing that line doesn't help. It locks up the script because it doesn't know when to stop. Do you know if there is a way to ask the API what NS numbers exist, build an array from that and then pull the information? Technical 13 (talk) 18:47, 10 April 2013 (UTC)[reply]
This API call: action=query&meta=siteinfo&siprop=namespaces gives all the namespaces. The reason I was limiting namespaces originally was because I wanted to iterate through an array with a counter incrementing by 1, and it failed when namespace numbers jumped from 15 to 100 all of the sudden. This is due to the way the namespaces array is built, which is to assign the namespace name to an index that is the same as the namespace number. A silly way to do it, but the script was developed on a wiki that only had consecutive namespace numbers. Knowing what I know now though, it seems like it would be pretty easy to just use a different structure or an associative array to hold the namespace numbers. — Bility (talk) 20:24, 10 April 2013 (UTC)[reply]
My script still does that with namespaces. It builds an array using the namespace number as the index number. The way I count the contributions though is using an array for the edit count as well. In your original script, you had the edit count as a simple variable that was reset as it moved to the next namespace. Making the counts an array as well arranges the counts with the namespaces. It's the same way you used to count the moves and protects. I think that's what hangs up your script, Technical. The simple edit variable loop can't handle the non-incremental namespace number jump. I also changed the move/protect count subtract to an overall log event count, but then add file events since uploads and overwrites are technically valid contributions. Kanegasi C 21:48, 10 April 2013 (UTC)[reply]
I know how it would look in php, but how would it look in js? php array would be something like:
0 => 0["Main", edits, moves, protections]
1 => 1["Main talk", edits, moves, protections]
2 => 2["User", edits, moves, protections]
3 => 3["User talk", edits, moves, protections]
...
15 => 15["Category talk", edits, moves, protections]
16 => 100["Portal", edits, moves, protections]
17 => 101["Portal talk", edits, moves, protections]
18 => 108["Book", edits, moves, protections]
19 => 109["Book talk", edits, moves, protections]
20 => 446["Education Program", edits, moves, protections]
21 => 447["Education Program talk", edits, moves, protections]
22 => 710["TimedText", edits, moves, protections]
23 => 711["TimedText talk", edits, moves, protections]
24 => 828["Module", edits, moves, protections]
25 => 829["Module talk", edits, moves, protections]
So, the top array would have 25 arrays in it named by their respective namespace number which should make it easy to pull the information for each and still use the consecutive 1, 2, 3... for loop... No? Technical 13 (talk) 00:54, 11 April 2013 (UTC)[reply]
You could do it the same way in JavaScript with a multidimensional array, but it's probably easier to fit into the existing code to just use a separate array that holds the namespace numbers (your top level above) and then use that to drive the namespace iteration. — Bility (talk) 01:54, 11 April 2013 (UTC)[reply]

Arbitrary break[edit]

So it turned out to be as easy as I thought, so I just updated mine and now it takes in all namespaces. You can see I now have the portal and module spaces on my edit count. Cheers, — Bility (talk) 14:25, 11 April 2013 (UTC)[reply]

I didn't really have much to add to the last comments, although the concept of visualizing the array was new to me. Pretty neat. I have tinkered with the script quite a bit more over the past week and I believe I reached a nice working plateau. I did some test stuff on Minecraft Wiki where I'm an admin and I now understand exactly how moves and protections work. This whole time I thought they did increment the wiki total and we were just subtracting them since they weren't edits. I now know it's the opposite. The script is supposed to get rid of that stuff from its count in order to match the wiki total. I also found out that new files increment, but not overwrites. My current version counts moves, protects, and overwrites and takes those away, then I take that number and subtract it from the wiki total to get deleted edits, and I put that in a tooltip on the total number. Testing it on my wikipedia account, it's dead on accurate. I have one deleted edit out of the 200ish contributions. My Minecraft Wiki count is above 4000 though, and the deleted edit count seems correct (didn't try to find all the deleted edits). Before I was admin, I marked quite a few things for deletion. I even increment the userspace count and total count by one each to account for the edit that submits the table, but that's OCD on my part to get things to match. There was also an issue that prevented the text link from changing when the script ran and I fixed that with a simple setTimeout delay to allow the text to change before the script kicks in. Just thought you guys would like to know my continued progress.
Oh, another interesting thing, I stumbled across the style tag "caption-side". I got rid of the encompassing <div> and using the |+ table caption with style="caption-side: bottom", the date/link at the bottom of the table sits comfortably where it was, but now it's all one table. You are allowed to use more than one |+ caption too, so it didn't interfere with my tableCaption variable. Both the main caption and the "footer" caption display normally when used. Kanegasi C 01:15, 21 April 2013 (UTC)[reply]
So, in the process of looking at another user's edit count usage on my wiki while on my iPhone (Safari), I noticed that their caption shows but not my date/link caption. Doing research, HTML standard should only allow one caption tag. I did some testing at browsershots.org and it seems Opera, Chrome, and IE support more than one caption (although IE is pretty stupid by displaying what should be the top caption to the left of the date caption, or ignoring the caption-side style and putting the date under the main caption. this seemed to be intermittent.). Firefox and Safari both honor what the HTML standard wants. I'm not sure how to fix this without putting the div back in. I kind of liked the tidy idea of just one solid table. Kanegasi C 19:21, 21 April 2013 (UTC)[reply]
(more rambling) I did not realize I had a "deleted user contributions" link as an admin on the Minecraft Wiki. Tinkering with the display limit, I have 171 deleted contributions and the script counted 176. I think that's pretty accurate. Searching through the API and comparing a lot of edits, I found that while usercontribs in the API does not show deleted/hidden edits, file logevents can. My file overwrite count is picking up overwrites on deleted files. I'm not quite sure how to tackle this in a simple manner. One idea of mine is to setup two completely separate arrays and put file titles into one from the contrib count of ns 6, then file titles into the array from the overwrite count, filter out recurring titles, and then count the titles left. Kanegasi C 03:45, 22 April 2013 (UTC)[reply]
For the caption, my advice would be to remove the extra caption or put the date in a colspan'd row at the bottom. There's no reason for extra captions anyway, especially how you've used it, as the title display is immaterial on a page that no one visits that's meant to be transcluded. If you wanted to add something extra to the page, like a category or display title, you don't need to put it in the table at all since it's not rendered. Using a caption for non-rendered content isn't semantically valid anyway.
Regarding the edit count discrepancy between MW's number and a totaling of user contribs, in the past the API wasn't fast enough to warrant the extra calculation time. At least not for me, since I have 40K+ edits on strategywiki, a ton of which are in the file namespace. The API seems to be a bit faster these days though, the last time I ran mine on SW it didn't even take a minute, so perhaps that's less of an issue. I really wish we had the ability to pass SQL queries through. It would be so much faster to just return the wanted aggregates instead of having to loop and count individual edits. Anyway, it's neat to see the differences between the two counting methods, and like you I researched where the differences come from pretty heavily, but ultimately abandoned the issue due to script run time.
Well, keep up the good work! — Bility (talk) 23:05, 22 April 2013 (UTC)[reply]
The way I'm using it is because I'm actually not using the caption, just hijacking the variable to put my page title css on the edit count page. A technically empty |+ like that doesn't get rendered into a second caption tag. The usage issue can be seen here (I used browsershots.org to get my tests). The reason I have the caption in the first place is using ultradude25's original title function wrapped in a div here, which comes to use on his main page (the first user I linked also does this). I originally didn't have a title/caption, just wrapped the date at the bottom in a div like ultradude25 did. Then I found the caption (which originally didn't work since encode() doesn't work with + and I eventually stumbled across encodeURIComponent), and pretty close after found out about caption-side: bottom. I have tried formatting the date in it's own cell/row, but when one uses the wikitable class, along with that horizontal layout, I didn't like the look of that super long row with a small date in it. I'm thinking that the table title would look relatively fine in it's own row on top though.
For the deleted edits, I greatly simplified the math I was using, but came up with the same slightly off amount. I put in functionality for custom namespace names as mentioned below, but haven't thought about how to filter out deleted overwrites. Looking at other user counts, along with access to their deleted edits on the Minecraft Wiki, there seems to be more inaccuracy, but I can't quite place where it's coming from. More goals :D Kanegasi C 02:48, 28 April 2013 (UTC)[reply]

collapsible collapsed[edit]

The script does seem to support |class=collapsible collapsed According to kipod says that it doesn't work if the table has <th>...</th> tags (table rows that start with "!" instead of "|"). This comment made from my BlackBerry Curve 9330/6.0.0.706 at 8:09a on 4/20/2013. - Please feel free to correct any typographical errors that may exist. Thank You. Technical 13 (talk) 12:01, 20 April 2013 (UTC)[reply]

The opposite is true. The table has to have the <th>...</th> tags in order for it to be collapsible. If the namespace row is plain cells (which is an option in my script) the collapse option will not work. See this revision of my edit count to see the collapse function working (with the ! headers) and this revision not working with normal cells. Kanegasi C 12:09, 20 April 2013 (UTC)[reply]
I'll have to play with that a little more, perhaps I misunderstood him. Technical 13 (talk) 12:19, 20 April 2013 (UTC)[reply]
Linked his name above and found the quote: "the "collapse" script does not touch the th (aka title). all i did was add a new "tr/td" pair," Technical 13 (talk) 22:48, 21 April 2013 (UTC)[reply]
Ah, I see. That's in context to a template. I was speaking about table code in general. A default table in a wiki (which is just wikicode shorthand for html table, th, tr, td, and caption tags) will only use the collapsed html function with th tags, so if a wiki table has no "|-" in it, it won't have a collapse function. I could see what they did with that script and do something similar in my script to force a collapse function independent of html tr tags. Kanegasi C 23:00, 21 April 2013 (UTC)[reply]

v91 with...[edit]

This table is getting too long and there are NS I haven't edited in yet. Do you think you could add a switch that would allow people to use NS Aliases/pseudo NS as column headers to fit more columns in the width of screen available? Technical 13 (talk) 22:49, 21 April 2013 (UTC)[reply]

I have noticed a "squishing" issue with my count table as well when viewing it on an iPhone (my browser is wide) but haven't considered doing anything about it. I'll look into it. Kanegasi C 23:00, 21 April 2013 (UTC)[reply]
v93 allows the nameSpaces array to preexist. I'm not too thrilled you still have to declare a new array and there's probably a neater and simpler way to do it in terms of someone setting up their common.js, like making carrier variables for each namespace or something "code messy" but user friendly on the outside. I'll update the doc later, but for now, you can put this in your common.js:
var nameSpaces = new Array();
nameSpaces[0] = 'custom Main name';
nameSpaces[1] = 'custom Talk name';
...and so on. The number in the brackets is the corresponding namespace id. You don't have to declare each namespace. The script will still fill in the canonical names for any namespace you don't declare. Kanegasi C 02:49, 28 April 2013 (UTC)[reply]

v100[edit]

I'm not very impressed with v100's preventing the script from running more than once per day. It is preventing me from trying different parameters to see how the output is resolved. Technical 13 (talk) 20:20, 6 May 2013 (UTC)[reply]

I see you're modifying the script again... User:Technical 13/Long edit count space in my name bug is back. Technical 13 (talk) 00:21, 7 May 2013 (UTC)[reply]
For the daily limit, there was someone in the past that was using it multiple times in a row, just to see the count increase. It wasn't until recently that I was comfortable enough with the script to try a "cooldown". I understand your thought process about testing settings, even though I believe it isn't necessary. Every one of the vars can be tested by manually changing the table itself and using the preview function. Despite my belief, though, I put in a bypass that unlocks the daily limit provided that the user has changed their common or vector pages the same day. I'm thinking about making a var just for this so the user can declare what script page to check, but I would rather not have this bypass known. As for your name bug, that's my fault. The new ajax call format using mw.util.wikiScript automatically includes url encoding for the api calls, but I forgot the simple contrib links still needed encoding. Sorry about that. v103 should work just fine. Kanegasi C 18:29, 7 May 2013 (UTC)[reply]

German titles/editcounter[edit]

How I can translate the titles into German? ILeon (talk) 12:11, 29 August 2013 (UTC)[reply]

Use the var nameSpaces option in the code you have in your common.js or wherever you placed the editcounter code. For example, the following produces what is shown here.
var nameSpaces = new Array();
    nameSpaces[3] = 'Utalk';
    nameSpaces[4] = 'MCW';
    nameSpaces[5] = 'MCWtalk';
    nameSpaces[7] = 'Ftalk';
    nameSpaces[8] = 'MW';
    nameSpaces[9] = 'MWtalk';
    nameSpaces[10] = 'Temp';
    nameSpaces[11] = 'Ttalk';
    nameSpaces[13] = 'Htalk';
    nameSpaces[14] = 'Cat';
    nameSpaces[15] = 'Ctalk';
The numbers correspond with namespace id numbers shown here on the right side. Kanegasi C 04:51, 23 September 2013 (UTC)[reply]

Bug in: Edit counter v107-109[edit]

Hey, I just noticed that your edit counter isn't placing my edit count on User:Technical 13/Long edit count anymore and now is instead placing it on User:Technical 13/User:Technical 13. I'm using var pageName = 'Long edit count'; although looking through your edits I can't see where or how there were any changes in your script that would cause that. The only thing I can think of is it may have something to do with the https: issue (I had to adjust my edit counter to adapt to that) or something in the api itself has been changed or modified. Let me go run the script again with the error console open and see I can get you some more information about what is happening. Technical 13 (talk) 18:04, 1 November 2013 (UTC)[reply]

Full console report running script
[14:04:58.390] ReferenceError: assignment to undeclared variable interwikiLink @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:38
[14:04:58.390] ReferenceError: assignment to undeclared variable subPages @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:43
[14:04:58.390] ReferenceError: assignment to undeclared variable datePageName @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:44
[14:04:58.390] ReferenceError: assignment to undeclared variable totalPageName @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:45
[14:04:58.390] ReferenceError: assignment to undeclared variable summaryLink @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:47
[14:04:58.390] ReferenceError: assignment to undeclared variable tableCaption @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:49
[14:04:58.390] ReferenceError: assignment to undeclared variable headerPipe @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:51
[14:04:58.390] ReferenceError: assignment to undeclared variable mainTableAttrib @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:57
[14:04:58.390] ReferenceError: assignment to undeclared variable topRowAttrib @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:60
[14:04:58.390] ReferenceError: assignment to undeclared variable bottomRowAttrib @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:61
[14:04:58.390] ReferenceError: assignment to undeclared variable noInclude1 @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:63
[14:04:58.390] ReferenceError: assignment to undeclared variable noInclude2 @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:66
[14:04:58.390] ReferenceError: assignment to undeclared variable noInclude3 @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:69
[14:04:58.390] ReferenceError: assignment to undeclared variable noInclude @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:72
[14:04:58.391] ReferenceError: assignment to undeclared variable tablePart4 @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:127
[14:04:58.469] GET http://en.wikipedia.org/w/api.php?format=json&action=query&prop=info&intoken=edit&titles=User%3ATechnical+13%2FUser%3ATechnical_13%7CUser%3ATechnical+13%2FUser%3ATechnical_13%2Fdate%7CUser%3ATechnical+13%2FUser%3ATechnical_13%2Ftotal%7CUser%3ATechnical+13%2Fcommon.js%7CUser%3ATechnical+13%2Fvector.js [HTTP/1.0 200 OK 229ms]
[14:04:58.732] GET http://en.wikipedia.org/w/api.php?format=json&action=query&meta=siteinfo&siprop=namespaces [HTTP/1.0 200 OK 209ms]
[14:04:58.948] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=logevents&leuser=Technical+13&letype=move&leprop=title&lelimit=max&ledir=newer&lestart=1 [HTTP/1.0 200 OK 1516ms]
[14:05:00.485] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=logevents&leuser=Technical+13&letype=protect&leprop=title&lelimit=max&ledir=newer&lestart=1 [HTTP/1.0 200 OK 316ms]
[14:05:00.808] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=logevents&leuser=Technical+13&leaction=upload%2Foverwrite&leprop=title&lelimit=max&ledir=newer&lestart=1 [HTTP/1.0 200 OK 158ms]
[14:05:01.000] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=1 [HTTP/1.0 200 OK 259ms]
[14:05:01.266] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-03-16T11%3A32%3A04Z [HTTP/1.0 200 OK 249ms]
[14:05:01.523] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-03-30T20%3A55%3A26Z [HTTP/1.0 200 OK 283ms]
[14:05:01.818] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-04-08T01%3A28%3A55Z [HTTP/1.0 200 OK 705ms]
[14:05:02.525] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-04-11T16%3A02%3A06Z [HTTP/1.0 200 OK 347ms]
[14:05:02.884] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-04-16T19%3A36%3A18Z [HTTP/1.0 200 OK 356ms]
[14:05:03.248] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-04-23T01%3A01%3A03Z [HTTP/1.0 200 OK 316ms]
[14:05:03.569] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-04-27T18%3A30%3A14Z [HTTP/1.0 200 OK 516ms]
[14:05:04.098] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-02T12%3A37%3A13Z [HTTP/1.0 200 OK 260ms]
[14:05:04.361] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-10T19%3A19%3A34Z [HTTP/1.0 200 OK 260ms]
[14:05:04.627] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-12T14%3A01%3A30Z [HTTP/1.0 200 OK 454ms]
[14:05:05.086] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-14T22%3A56%3A14Z [HTTP/1.0 200 OK 393ms]
[14:05:05.485] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-19T14%3A07%3A08Z [HTTP/1.0 200 OK 255ms]
[14:05:05.746] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-21T12%3A43%3A22Z [HTTP/1.0 200 OK 366ms]
[14:05:06.117] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-05-26T00%3A52%3A43Z [HTTP/1.0 200 OK 287ms]
[14:05:06.410] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-06-04T14%3A41%3A49Z [HTTP/1.0 200 OK 741ms]
[14:05:07.159] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-06-10T17%3A25%3A38Z [HTTP/1.0 200 OK 287ms]
[14:05:07.454] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-06-21T15%3A05%3A47Z [HTTP/1.0 200 OK 302ms]
[14:05:07.763] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-07-08T13%3A16%3A47Z [HTTP/1.0 200 OK 692ms]
[14:05:08.461] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-07-28T23%3A45%3A59Z [HTTP/1.0 200 OK 486ms]
[14:05:08.954] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-08-15T13%3A37%3A28Z [HTTP/1.0 200 OK 401ms]
[14:05:09.363] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-08-31T16%3A11%3A08Z [HTTP/1.0 200 OK 636ms]
[14:05:10.003] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-09-10T19%3A19%3A00Z [HTTP/1.0 200 OK 469ms]
[14:05:10.480] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-09-19T16%3A29%3A27Z [HTTP/1.0 200 OK 265ms]
[14:05:10.752] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-09-24T16%3A48%3A10Z [HTTP/1.0 200 OK 503ms]
[14:05:11.261] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-10-02T15%3A01%3A42Z [HTTP/1.0 200 OK 286ms]
[14:05:11.558] GET http://en.wikipedia.org/w/api.php?format=json&action=query&list=usercontribs&ucuser=Technical+13&ucprop=title&uclimit=max&ucdir=newer&ucstart=2013-10-26T00%3A30%3A05Z [HTTP/1.0 200 OK 241ms]
[14:05:11.749] ReferenceError: reference to undefined property edits[i] @ https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript:434
[14:05:11.810] GET http://en.wikipedia.org/w/api.php?format=json&action=query&meta=userinfo&uiprop=editcount [HTTP/1.0 200 OK 209ms]
[14:05:12.026] POST http://en.wikipedia.org/w/api.php [HTTP/1.0 200 OK 1966ms]
For the record, my full code calling your script in my User:Technical 13/vector.js is:
Section of JavaScript. No need to stretch out page.
// Counts all your edits and saves them to a page ( http://en.wikipedia.org/wiki/User:Kanegasi/editcounter )
if (mw.config.get('wgTitle') === mw.config.get('wgUserName') && mw.config.get('wgNamespaceNumber') === 2) {
// begin options
 
var pageName = 'Long edit count';
//var tableHeaders = false;
//var mainTableAttrib = 'class="collapsible collapsed"';
var dateFormat = 'G:i - F j, Y';
var nameSpaces = new Array();
nameSpaces[4] = '[[WP:NS4|WP:]]';
nameSpaces[5] = 'WT';
nameSpaces[10] = '[[WP:NS10|T:]]';
nameSpaces[11] = 'TT';
nameSpaces[12] = '[[WP:HELPNS|H:]]';
nameSpaces[13] = 'HT';
nameSpaces[14] = '[[H:CAT|CAT:]]';
nameSpaces[15] = 'CATT';
nameSpaces[100] = '[[WP:P|P:]]';
nameSpaces[101] = 'PT';
 
// end options
    mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Kanegasi/editcounter.js&action=raw&ctype=text/javascript');
}
Happy bug finding! Technical 13 (talk) 18:11, 1 November 2013 (UTC)[reply]
I'm not quite sure what the issue is. I copied what you have in your vector page and used that and my count appeared in Long edit count just fine. I have done nothing about https since my script does not differentiate between http and https and gets all url data from MediaWiki variables that Wikipedia provides. More than likely, this was a one-time issue on Wikipedia's side, like something went wrong with giving your browser the correct variable data. Kanegasi C 05:14, 4 November 2013 (UTC)[reply]
That's just it, it's not a one time issue. If you look at the history pages for each User:Technical 13/Long edit count stops on September 9 (except my manual edit not made by the script) and User:Technical 13/User:Technical 13 shows that the script has posted it there every time since. I'll even run it again right now... Again it posted to 13/User:Technical 13&oldid= . I'm not sure where the bug is. Go ahead and take another look at it and if still nothing I'll see if maybe someone on VPT can figure it out. Technical 13 (talk) 15:24, 4 November 2013 (UTC)[reply]
Alright, I found two issues, none of which are from my script, but both I could fix as well as you can. I'm not very savvy with global variables and strict mode and such, but because my script and your scripts are declaring global variables, they are interfering with each other.
The first issue, the one that is causing User:Technical 13/User:Technical 13, is your User:Technical_13/SandBox/Gadget-listStyles.js script is declaring a pageName value, which is overwriting my script's pageName value. I suggest using a unique variable for that.
The second issue, which is a separate one, is that our edit scripts cannot coexist because they use the same "t-editcounter" id on the menu link. They need to be different.
Both of these issues are both our faults. I'm about to go to work, and on top of that, I have other activities that may not let me tinker with my script for another few more days. In the meantime, make sure all of your variables are unique as well as use a different id for the menu link. I'll also make sure my variables are more unique sometime in the future. Kanegasi C 19:30, 4 November 2013 (UTC)[reply]

Can't get it to work[edit]

I probably do something wrong. I copied the jscript to my .js and running it was a "Succes!". I tried to copy the table to my user space, but nothing happens. Can you take a look? I'm fine if you want to adjust something on my user space. Kind regards, Timelezz (talk) 15:35, 30 March 2014 (UTC)[reply]

Check your contributions. It worked just fine: User:Timelezz/edit count. Also, I'm not too familiar with Wikipedia's userspace policies, but I, and perhaps others, would appreciate it if you do not edit someone else's userspace. Kanegasi C 15:44, 30 March 2014 (UTC)[reply]
I see it was not clear to me that I had to look at /edit count. I copied the template table to my user page which did not work. Now I've copied the table from the sub page, to my User page which seems to be stable. Thank you for your help!
Ps. I gave you personally explicit permission to edit my personal user page which overrules any guidelines that would prohibit that. Kind regards, Timelezz (talk) 13:18, 31 March 2014 (UTC)[reply]
I know you gave me permission, which I just took advantage of to transclude your table so you don't have to copy it every time. I was referring to you editing my info page about the script. Kanegasi C 18:08, 31 March 2014 (UTC)[reply]
Thank you very much and my apologies. I was under the impression this was a regular page, not a user space. Hope you don't mind too much. Kind regards, Timelezz (talk) 18:31, 31 March 2014 (UTC)[reply]

Api change[edit]

Hey Kanegasi, heads up. They changed the api so &ucstart= is now &uccontinue= and the api now returns it as query-continue.uccontribs.uccontinue from query-continue.uccontribs.ucstart. — {{U|Technical 13}} (etc) 16:44, 1 June 2014 (UTC)[reply]

I'll take this to mean that it's broken until he changes some things? - Exhelah t - c — Preceding undated comment added 18:27, 28 September 2014 (UTC)[reply]

JavaScript facepalm...[edit]

facepalm...

1. use logic operators for setting defaults value:

tableCaption = tableCaption || '';

2. new Array() - is deprecated, is very very old style;

use literal [];

95.143.120.218 (talk) 10:49, 17 April 2015 (UTC)[reply]

Edit counter[edit]

Hi Kanegasi, sorry to bother you. I've been using your script for a while, and it works great. However, I have gone to update this today, and there is now no field to be able to update this under user contributions. Is this likely to be a browser issue (Same browser as always, Chrome), or a script issue? Thank you for your time. Lee Vilenski (talkcontribs) 17:00, 16 November 2018 (UTC)[reply]