User:Laughing Man/history.js

//Helper tools

//admin list document.write(' '); //END //bot list document.write(' '); //END //All skins document.write(' '); //END document.write(' '); //END

//History stats $(addhiststats) function addhiststats { if (location.href.indexOf('&action=history') !=-1 && location.href.indexOf('&jsaction=validate') ==-1) {     addTab("javascript:histstats", "%", "ca-stats", "History statistics", ""); if (wgNamespaceNumber==0) {addTab("http://tools.wikimedia.de/~tim/cgi-bin/contribution-counter?page=" + wgPageName + "&namespace=Articles&dbname=enwiki_p", "tree", "ca-editors", "Editor statistics", "");} } else if (location.href.search(/Special:(Undelete\/|Undelete.*&target=)/) !=-1 && location.href.search(/&timestamp=|&action=submit/) == -1) {      addTab("javascript:histstats", "%", "ca-stats", "Revision statistics", ""); } else if (location.href.search(/=(Special:Log|Special%3ALog).*&user=[^&]+/) !=-1 && location.href.search(/=Special:Log\/|&type=\w/) ==-1) {      addTab("javascript:logstats", "%", "ca-stats", "User's log statistics", ""); addTab("javascript:masterview(2000)", "2k", "ca-v2k", "view last 2000 actions", ""); addTab("javascript:masterview(5000)", "5k", "ca-v5k", "view last 5000 actions", ""); } else if (document.title.indexOf('User contributions') == 0) {      addTab("javascript:sumperentcuse", "%", "ca-sumuse", "User's edit statistics", ""); addTab("javascript:masterview(2000)", "2k", "ca-v2k", "view last 2000 edits", ""); addTab("javascript:masterview(5000)", "5k", "ca-v5k", "view last 5000 edits", ""); if (location.href.search(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) ==-1) addTab("javascript:get_userlist_xml", "$", "ca-rts", "Shows user groups", ""); } else if (document.title.search(/User:|User talk:/) == 0 && document.title.indexOf('/') == -1 && location.href.search(/Special:/) ==-1) {addTab("javascript:get_userlist_xml", "$", "ca-stats6", "Shows user groups", "");} } //END

function logstats { //monobook if (document.getElementById('bodyContent')) { var body = document.getElementById('bodyContent'); } //cologneblue else if (document.getElementById('quickbar')) { if (!document.getElementById('content')){return;} var body = document.getElementById('content'); } if (document.getElementById('contentSub').innerHTML.indexOf('Viewing log statistics ') !=-1) {alert("Results already shown."); return;} var protects = 0; var unprotects = 0; var deletes = 0; var undeletes = 0; var blocks = 0; var range_blocks = 0; var unblocks = 0; var moves = 0; var rights = 0; var botsf = 0; var botsd = 0; var renames = 0; var uploads = 0; var other = 0; if (!body.getElementsByTagName('ul')[0]) {alert('No log events found!'); return;} var l = body.getElementsByTagName('ul')[0].getElementsByTagName('li'); for (var i=0; i ) moved ) uploaded ") blocked ") unblocked ) protected ) unprotected ) deleted ") restored "\) changed 's rights from/) !=-1)    {rights += 1;}  else if (html.indexOf(' \(Renamed the user') !=-1) {renames += 1;} else if (html.indexOf('/a>) granted bot status to ) removed bot status from <a href=') !=-1) {botsd += 1;} } //Timing var first_date = l[0].innerHTML.split(' <a href=')[0].split('<A HREF=')[0]; var last_date = l[i-1].innerHTML.split(' <a href=')[0].split('<A HREF=')[0]; var current_date = new Date; current_date = current_date.toUTCString.replace(/GMT/, "UTC"); var E = l.length; var totdays = getDateDiff(current_date,last_date); var Daylength = Math.round((1)*totdays)/1; if (Daylength == 0) Daylength = 1; // var average = E/totdays; document.getElementById('contentSub').innerHTML = ' Viewing log statistics data for this user for the ' + E + ' events shown on this page ' // var TimeDATE = ' Time range: ' + Daylength + ' approximate day(s) of log items on this page ' + 'Current time: ' + current_date + ' || Oldest action on: ' + last_date + ' (UTC) '; // document.getElementById('bodyContent').innerHTML = ' ' + document.getElementById('contentSub').innerHTML + ' ' + TimeDATE + ' Average actions per day: ' + Math.round((100)*average)/100 + ' (for last ' + E + ' actions(s)) ' + ' User actions: ' + ' Page moves: ' + Math.round((100)*(100*(moves)/E))/100 + ' % (' + moves + ' actions(s)) ' + ' Uploads: ' + Math.round((100)*(100*(uploads)/E))/100 + ' % (' + uploads + ' actions(s)) ' + ' Sysop actions:  ' + ' Page protects: ' + Math.round((100)*(100*(protects)/E))/100 + ' % (' + protects + ' actions(s)) ' + ' Page unprotects: ' + Math.round((100)*(100*(unprotects)/E))/100 + ' % (' + unprotects + ' actions(s)) ' + ' Deletes: ' + Math.round((100)*(100*(deletes)/E))/100 + ' % (' + deletes + ' actions(s)) ' + ' Undeletes: ' + Math.round((100)*(100*(undeletes)/E))/100 + ' % (' + undeletes + ' actions(s)) ' + ' Blocks: ' + Math.round((100)*(100*(blocks)/E))/100 + ' % (' + blocks + ' actions(s)) (' + range_blocks + ' range block(s)) ' + ' Unblocks: ' + Math.round((100)*(100*(unblocks)/E))/100 + ' % (' + unblocks + ' actions(s)) ' + ' Bureaucrat actions:  ' + ' Promotions: ' + Math.round((100)*(100*(rights)/E))/100 + ' % (' + rights + ' actions(s)) ' + ' Bot flaggings: ' + Math.round((100)*(100*(botsf)/E))/100 + ' % (' + botsf + ' actions(s)) ' + ' Bot de-flaggings: ' + Math.round((100)*(100*(botsd)/E))/100 + ' % (' + botsd + ' actions(s)) ' + ' Renames: ' + Math.round((100)*(100*(renames)/E))/100 + ' % (' + renames + ' actions(s)) ' + body.innerHTML.split('')[1]; }

function masterview(number) {

if (location.href.search(/&limit=\d+/) !=-1) { var limit = location.href.match(/&limit=\d+/g)[0]; var url = location.href.replace(limit,'&limit=' + number); } else if (location.href.indexOf('Special:Contributions/') !=-1) { var name = location.href.split('Special:Contributions/')[1]; var url = '/w/index.php?title=Special:Contributions&limit=' + number + '&target=' + name; } else {var url = location.href + '&limit=' + number;} location.href = url; }

//*********************** //standard XML Support function HTTPClient { var gml_http; if(window.XMLHttpRequest) { gml_http = new XMLHttpRequest; } else if (window.ActiveXObject) { try { gml_http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { gml_http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { gml_http = false; }   }  }  return gml_http; }

function gml_XMLParse(string) { if (document.implementation.createDocument) { return gml_xmlparser.parseFromString(string, "text/xml"); } else if (window.ActiveXObject) { var gml_xmldoc = new ActiveXObject("Microsoft.XMLDOM"); gml_xmldoc.async = "false"; ret = gml_xmldoc.loadXML(string); if (!ret) return null; return gml_xmldoc.documentElement; } return null; } //END //**********

function get_userlist_xml { document.getElementById('contentSub').innerHTML += ' Searching for current usergroup information.' + '\n' + 'Please wait... '; gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; if (document.title.indexOf('User:') == 0) {user_name = document.title.split('User:')[1].split(' - ')[0];} else if (document.title.indexOf('User talk:') == 0) {user_name = document.title.split('User talk:')[1].split(' - ')[0];} else {user_name = document.getElementById('contentSub').getElementsByTagName('a')[0].innerHTML;} var pageurl = '/w/index.php?title=Special:Listusers&group=&username=' + user_name; gml_xmlhttp.open("GET", pageurl, true); gml_xmlhttp.onreadystatechange = alertget; gml_xmlhttp.send(null); }

function getusergroup { gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; var pageurl = '/w/index.php?title=Special:Listusers&group=sysop&limit=5000'; gml_xmlhttp.open("GET", pageurl, true); gml_xmlhttp.onreadystatechange = userget; gml_xmlhttp.send(null); }

function alertget { if (gml_xmlhttp.readyState != 4) return; xml = gml_xmlhttp.responseText.replace(//, '<body class="ns-4">'); doc = gml_XMLParse(xml); var rights = '(username invalid)'; if (doc.getElementsByTagName('li')[0]) {rights = doc.getElementsByTagName('li')[0].innerHTML;} if (user_name.indexOf('FAQ') !=-1) {user_name = document.getElementById('bodyContent').getElementsByTagName('a')[1].innerHTML;} document.getElementById('contentSub').innerHTML += ' ' + rights + ' '; }

function userget { if (gml_xmlhttp.readyState != 4) return; alert("Usergroup list obtained. Seaching for " + user_name + "."); xml = gml_xmlhttp.responseText.replace(/<body.*"ns-4">/, '<body class="ns-4">'); doc = gml_XMLParse(xml); var l = doc.getElementsByTagName('li'); var user_name = document.getElementById('bodyContent').getElementsByTagName('a')[0].innerHTML; var user_sysop = 'no'; for (i = 0; i < l.length; i++) {    var name = l[i].getElementsByTagName('a')[0].innerHTML; if (user_name == name){user_sysop = 'yes'; break;} }   return user_sysop; }

//Summary percent use function sumperentcuse { if (document.getElementById('contentSub').innerHTML.indexOf('Viewing contribution data for') !=-1) {alert("Results already shown."); return;} //check name rights_status = ''; Username = 'this user'; if (location.href.indexOf('username=') !=-1) {Username = location.href.split('username=')[1].split('&')[0].replace(/\+/g,' ');} else {Username = document.getElementById('bodyContent').getElementsByTagName('a')[0].innerHTML;} theusername = 'user ' + Username + ' '; document.getElementById('contentSub').innerHTML += " Analyzing contributions...please wait "; gml_xmlhttp = HTTPClient; var pageurl = '/w/index.php?title=Special:Log&type=upload&user=' + Username + '&page=&limit=5000&useskin=standard'; gml_xmlhttp.open("GET", pageurl, true); gml_xmlhttp.onreadystatechange = sumperentcuse2; gml_xmlhttp.send(null); }

edits_page_compared_js = 0; function sumperentcuse2 { if (gml_xmlhttp.readyState != 4) return; xml = gml_xmlhttp.responseText; document.getElementById('contentSub').innerHTML += " Analyzing uploads... "; Uploads = 0; Uploads_length = 0; var up_list_unique = '|'; if (xml.indexOf('<ul>') !=-1) { xml = xml.split('<ul>')[1].split('</ul>')[0]; Uploads_length = xml.split('<li>').length-1; var l = xml.split('<li>'); for (z=0; z<l.length; z++) {    var litxt = l[z].split('</li>')[0]; var name = l[z].split('</li>')[0]; if (name.indexOf(') uploaded "<a href="') !=-1){name = name.split(') uploaded "<a href="')[1];} else if (name.indexOf(') uploaded "<A href="') !=-1){name = name.split(') uploaded "<A href="')[1];} else {name = '';} name = name.split('" title="')[0]; if (up_list_unique.indexOf('|' + name + '|') == -1 && name.indexOf('action=edit') == -1 && name != '' && litxt.indexOf('(Reverted to ') == -1)     {up_list_unique += name + '|';}     }  }  Uploads = up_list_unique.split('|').length-2;  sumperentcuse3; }

//initializing EC_tot = 0; // Pagelist = ''; TE = 0; sum_edits = 0; sumart_edits = 0; Art_minor = 0; Artm_to_minor = 0; Sum_value = -1; NS = 0; M = 0; R = 0; EX = 0; UM = 0; MAM = 0; //minor/major flagging All_markedMaj = 0; All_markedMin = 0; Minor_withsum = 0; Major_withsum = 0; Major_edit_sum = 0; Major_article_sum = 0; Minor_article_sum = 0; Article_minor_edits = 0; Article_major_edits = 0; Is_minor = 0; Not_minor = 0; //namespaces Talk = 0; User = 0; Usertalk = 0; Mediawiki = 0; Wikipediatalk = 0; Wikipedia = 0; Images = 0; Template = 0; Category = 0; Portal = 0; Help = 0; TTalk = 0; ITalk = 0; HTalk = 0; PTalk = 0; CTalk = 0; MTalk = 0; ArticleE = 0; //unique pages Unique_pages = 0; //degree of contribution ArtSig = 0; ArtSf = 0; ArtRv = 0; ArtM = 0; ArtUM =0; //type of non-article contribs BOT_tot = 0; RAfC_tot = 0; CP_tot = 0; FAC_tot = 0; AN_tot = 0; RfA_tot = 0; AfC_tot = 0; RfA_votes_S = 0; RfA_votes_O = 0; XfD_tot = 0; AWB_edits = 0; Protections = 0; Moves = 0; Dummy_Moves = 0; Redirects = 0; User_warnings = 0; User_welcomes = 0; //block list (for "compare" compatibility) blk_num = 0; // function sumperentcuse3 { var compare = 0; document.getElementById('contentSub').innerHTML += " Analyzing edits... "; if (document.getElementById('contentSub').innerHTML.indexOf('edit comparison between') !=-1){compare = 1;} if (Username == 'Talk' && compare == 0) {theusername = ' this IP address ';} else if (compare == 1) {theusername = ' these users ';} else if (Username == 'navigation') {theusername = ' these IP addresses ';} if (theadminlist.indexOf('|' + Username + '|') !=-1) {rights_status = ' (sysop) ';} var cnt = 0; //tagging edits var rvlink = ' rv '; var nslink = ' no summary '; var mslink = ' minor '; var sflink = ' superficial '; var sflink2 = ' superficial '; var mamlink = ' minor '; var tplink = ' most recent ' var umplink = ' unmarked ' var alink = ' notable '; var malink = ' notable! '; var minalink = ' significant '; var c = document.getElementById('contentSub'); var a = c.getElementsByTagName('a'); l = document.getElementById('bodyContent').getElementsByTagName('li'); if (l[0] == undefined){alert("Nothing to analyze!"); return;} //For loop START for (i = 0; i < l.length; i++) {    if (l[i].innerHTML.search(/ (unblocked|blocked)( "| )<[Aa] href="/) == -1) {         var tpnt = ''; //find pagename, and split li text after it to get summary text, the k loop fixes this for autosums if (l[i].getElementsByTagName('a')[2]) {tpnt = l[i].getElementsByTagName('a')[2].innerHTML;} var Careful = 'no'; var Revert = 'no'; var Minor = 'no'; var Superfic = 'no'; var Notable = 'no'; var Significant = 'no'; var Minor_nonrv = -1; var Minor_or_sum = -1; var Marked_as_minor = 'no'; var Namespace_type = 'non-article'; var Namespace = ''; Sum_value = -1; //get the edit summary var autoc = 'no'; var the_sum = ''; for (k = 0 ; k < l[i].getElementsByTagName('span').length; k++) {           if (l[i].getElementsByTagName('span')[k].className == 'minor') {                           Minor_nonrv = 1; Minor_or_sum = 1; Minor = 'yes'; Marked_as_minor = 'yes'; }          else if (l[i].getElementsByTagName('span')[k].className == 'autocomment') {                     autoc = 'yes'; Sum_value = 1; Minor_or_sum = 1; the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML; if (the_sum.search(/ -<\/span> /i) !=-1) the_sum = the_sum.split(/ -<\/span> /i)[1]; else if (the_sum.search(/ -<\/span>/i) !=-1) the_sum = the_sum.split(/ -<\/span>/i)[1]; else if (the_sum.search(/-<\/span>/i) !=-1) the_sum = the_sum.split(/-<\/span>/i)[1]; else {                      Sum_value = -1; the_sum = ''; if (Minor == 'no') Minor_or_sum = -1; }                 break; }          else if (l[i].getElementsByTagName('span')[k].className == 'comment') {                           Sum_value = 1; Minor_or_sum = 1; var Careful = 'no'; the_sum = l[i].getElementsByTagName('span')[k].innerHTML; }            } //End of k loop //get pagename (var "Namespace" is really just the page name here) //edit type passes included here if (l[i].getElementsByTagName('a')[2]) {var Namespace = l[i].getElementsByTagName('a')[2].innerHTML;} if (Pagelist.indexOf('|' + Namespace + '|') == -1) {Pagelist += '|' + Namespace + '|'; Unique_pages += 1;} //get protections if (the_sum.search(/\((Protected|Unprotected) .+: .+/) ==0)         {Protections += 1;} //get moves       else if (the_sum.search(/\(moved <a href=.+<.a> to <a href=.+<.a>/i) ==0 && Marked_as_minor == 'yes') {Moves += 1;} //get moves else if (the_sum.search(/\(moved <a href=.+<.a> to <a href=.+<.a>:/i) ==0 && Marked_as_minor == 'no')         {Dummy_Moves += 1;} //get redirects       else if (the_sum.search(/\((redirect|redir|red\.|#redirect|#redir|#red\.|page redir|redirection to|r\)|rd\)|rd\.\))|(fix|make|create|double|repair|db|dbl|bypass|skip) redir/i) ==0)          {Redirects += 1;} //get AWB edits       if (the_sum.search(/using <a href="\/wiki\/Wikipedia:AutoWikiBrowser"| using <a href="\/wiki\/(WP|[Ww]iki|[Ww]ikipedia):AWB"/i) !=-1)          {AWB_edits += 1; Careful = 'yes'; Superfic = 'yes';} //remove links from summary the_sum = the_sum.replace(/<a href=([^>\]])+>([^<])+<\/a>/ig,''); //sort namespaces          if (Namespace.indexOf('Talk:') == 0)           {          Namespace_type = 'talk';          Talk = Talk + 1;           }          else if (Namespace.indexOf('User:') == 0)           {          Namespace_type = 'talk'; User = User + 1; }         else if (Namespace.indexOf('User talk:') == 0) {         Namespace_type = 'talk'; Usertalk = Usertalk + 1; if (the_sum.search(/\(test|\(warn|test\d|test[-: ]|warn (user|vandal)|user notice:|warning[ :\)]|vandism|vandaliz|please stop|your (recent|edits)|regarding (changes|edits)|changes to/i) !=-1)             {User_warnings += 1;}          else if (the_sum.search(/welcome[ :\)!]|welc[ :\)!]|welc.[ :\)!]|(create|make) an account/i) !=-1) {User_welcomes += 1;} }         else if (Namespace.indexOf('MediaWiki:') == 0) {         Mediawiki = Mediawiki + 1; }         else if (Namespace.search(/(Commons|Wikipedia) talk:/) == 0) {         Namespace_type = 'talk'; Wikipediatalk = Wikipediatalk + 1; }         else if (Namespace.search(/(Commons|Wikipedia):/) == 0) {         Wikipedia = Wikipedia + 1; if (Namespace.search(/Wikipedia:Articles for creation\//) == 0) {AfC_tot += 1;} if (Namespace.search(/Wikipedia:[Rr]equests for ([Cc]omment|[Aa]rbitration)/) == 0) {RAfC_tot += 1;} else if (Namespace.search(/for [Dd]eletion|Deletion [Rr]eview|Redirects for discussion/) !=-1) {             XfD_tot += 1; }            else if (Namespace.search(/Wikipedia:Copyright/) !=-1) {CP_tot += 1;} else if (Namespace.search(/Wikipedia:Featured (article|picture|list) candidates/) !=-1) {FAC_tot += 1;} else if (Namespace.search(/Wikipedia:(Administrators' noticeboard|Administrator intervention against vandalism|Requests for investigation|WikiProject on open proxies|Long term abuse|Suspected sock puppets|Abuse reports|Personal attack intervention noticeboard|Requests for checkuser)/) !=-1) {AN_tot += 1;} else if (Namespace.search(/Wikipedia:Requests for (adminship|bureaucratship)/) == 0) {             RfA_tot += 1; if (the_sum.search(/\((support|supp\.|sup\.|supp|endorse|(e|s|ss|ws)[\.\)]|nominate\)|new )|(endorse|support|supp|sup\.|absolutely|definitely|[\.\(][es])[\);:]/i) != -1)               {RfA_votes_S += 1;}                else if (the_sum.search(/\((oppose|op\.|opp|reject|no[\.\)]|(o|wo|so)[\.\)])|(oppose|opp|op\.|absolutely not|definitely not|[\.\(]o)[\);:]/i) != -1) {RfA_votes_O += 1;} }            else if (Namespace.indexOf('Wikipedia:Bots/Requests for approval') == 0) {BOT_tot += 1;} }         else if (Namespace.indexOf('Image:') == 0) {         Images = Images + 1; }         else if (Namespace.indexOf('Template:') == 0) {         Template = Template + 1; }         else if (Namespace.indexOf('Category:') == 0) {         Category = Category + 1; }         else if (Namespace.search(/(Portal|Creator):/) == 0) {         Portal = Portal + 1; }         else if (Namespace.indexOf('Help:') == 0) {         Help = Help + 1; }         else if (Namespace.search(/Template talk:/) == 0) {         Namespace_type = 'talk'; TTalk = TTalk + 1; }         else if (Namespace.search(/Image talk:/) == 0) {         Namespace_type = 'talk'; ITalk = ITalk + 1; }         else if (Namespace.search(/Category talk:/) == 0) {         Namespace_type = 'talk'; CTalk = CTalk + 1; }         else if (Namespace.search(/(Portal|Creator) talk:/) == 0) {         Namespace_type = 'talk'; PTalk = PTalk + 1; }         else if (Namespace.search(/Help talk:/) == 0) {         Namespace_type = 'talk'; HTalk = HTalk + 1; }         else if (Namespace.search(/MediaWiki talk:/) == 0) {         Namespace_type = 'talk'; MTalk = MTalk + 1; }         else {          Namespace_type = 'article'; } //begin passes if (Namespace_type == 'article' && Sum_value == 1) { //notable edits if (the_sum.search(/ created[\.;:\)]|create[\.;:\)]| creation[\.;:\)]|rastic addition|rastic edit|rastic cha|rastic mod|expansion |rewriting[:\.\)]|rewrote[ :\.\)]|(rewriting|rewrite|rewrote)[ :\.\)](completely|page|article|bio)|(major|large|significant) (section|addition|rewrite)/i) !=-1 || the_sum.search(/(add )(a | )(lot|large|tons|great|signif)|(write|create|initial|start|begin) (brand|new|article|page)|major (ed|ch|mod)|interim save|\(expand(ed|ing)(page|article|stub|bio)|[ \(]expan(d|ed|ing)[ :\.\)]|contin(uing|ued) (addition|expand|expans|writ)/i) !=-1 || the_sum.search(/(\+|(add|added|adding|more|elaborate)[ :\.\)]|create |another )(history|paragraph|section|references|sources|sourcing|citations|refs|photos|images|pictures)/i) !=-1 || the_sum.search(/(create|created|creating|made|making|quick|\(new|start|begin|started|starting)( new | this | )(stub|basic|initial|article|page|bio|section|paragr|draft)/i) !=-1 || the_sum.search(/(added|adding) (basic|initial|biog|section|paragr|details)|creat(e|ed|ing) (page|section|article|biog)/i) !=-1 || the_sum.search(/(references| sources| sourced|citations) add|(\(|^)(sources|additional|reference|source|citation|refs|photos|images|ictures|pics)\)/i) !=-1 || the_sum.search(/\((create[\.;:\)]|created[\.;:\)]|creation[\.;:\)]|de novo[\.;:\)]|bio[\.;:\)]|biography[\.;:\)]|begin[\.;:\)]|start[\.;:\)]|article[\.;:\)]|page\))/i) !=-1) {Careful = 'yes'; Minor = 'no'; Minor_nonrv = -1; Notable = 'yes';} //significant edit pass 1 else if (the_sum.search(/Info|Content|addition[\.;:\)]|addition[\.;:\)]| facts|facts\)|^add\)| facts|\(add[\.;:\)]|(quotes|fact|xample|xpand|ompromise| accurate| sentence[ :\.\)]| about)/i) !=-1 || the_sum.search(/biography|(ade|reate) article\)|creat(e|ion) |copyedit|descri(ption|be)/i) !=-1 || the_sum.search(/(add|finish|finishing|finished|more|\+|another)([ :\.\)]|)(reference|citation|source|info|content|image|photo|pic|section)/i) !=-1 || the_sum.search(/(reference|itation|source|info|content|image|photo|pictures) (added|included|create|uploaded)/i) !=-1 || the_sum.search(/\((create|created|creating) |(\(|^)(source|blurb|note|addition|reference|sources|citation|ref|photo|image|icture|pic|more)\)/i) !=-1 || the_sum.search(/(rewriting[ :\.\)]|rewrite[ :\.\)]|rewrote[ :\.\)])(section|lead|intro|paragraph)/i ) !=-1 || the_sum.search(/\(([^ ])+ (note|blurb|data|sourcing)\)/i) !=-1 || the_sum.search(/^(\(| )( |)(note|blurb|data|sourcing)\)/i) !=-1) {Careful = 'yes'; Minor = 'yes'; Significant = 'yes'; Minor_nonrv = 1;} //summary rules else if (autoc == 'no' && the_sum.length < 12) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (autoc == 'yes' && the_sum.length < 10) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length ==1) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1; Careful = 'yes';} else if (the_sum.split(' ').length ==2) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length < 3 && Minor == 'no') {Minor = 'yes'; Significant = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length < 3 && Minor == 'yes') {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} } //basic flagging if (Minor_or_sum == -1) {           UM = UM + 1; NS = NS + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + umplink + ') #' + UM; }         else if (Sum_value == -1) {         NS = NS + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + nslink + ') #' + NS; }         if (l[i].innerHTML.indexOf('(top)') !=-1) {TE = TE + 1;} //article reverts if (Namespace_type == 'article' && Sum_value == 1 && the_sum.search('(P|p)rotect(ed| )') == -1) {       if (the_sum.search(/(RV|Rv|rV)[Vv]|-[ -]rv|[Rr](V|v)|\(rv|\(R[Vv]|RV[ :;\)]|Rv[ :;\)]|rv[ :;\)]|[Rr]m |[Rr]mv/) !=-1 || the_sum.search(/[ \(]rever(t|ted|ting)|rever(t|ted|ting)[ :;\)]|reversion|graffitti| nonsense|vandal ed| vandal|rollback[ :\.\)]| irrelevant| unverified/i) !=-1 || the_sum.search(/dele(t|ed|e) vandal|linkspam|remov(ed|ing)|delet(ed|ing) |reinsta(t|ted)[ :\.\)]|restor(e|ed|ing)[ :\.\)]| previous[ :\.\)]| version /i) !=-1 || the_sum.search(/re-added|re-inserted|added back /i) !=-1 || the_sum.search(/back again|POINT|no such |speculation\)| such thing| agree with[ :\.\)]| don't[ :\.\)]| do not[ :\.\)]|\(surely[ :\.\)]|\?[ :\.\)]|\?\.|\?\)/i) !=-1 || the_sum.search(/linkspam[ :\.\)]|nonsense[ :\.\)]|vandal ed|ollback[ :\.\)]| vandal| vandals | vandal[ \.\)]|trolling|delete[:\.\)]/i) !=-1) {         Superfic = 'no'; Notable = 'no'; Significant = 'no'; Minor_nonrv = -1; Revert = 'yes'; R = R + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + rvlink + ') #' + R;           } } //long summary article reverts else if (Namespace_type == 'article' && Sum_value == 1 && the_sum.search('(P|p)rotect(ed| )') == -1 && the_sum.length > 25) {       if (the_sum.search(/remove[ :\.\)]|removed[ :\.\)]|[ :\)]remove|[ :\)]removed|seriously[ :\.\)]|WTF[ :\.\)]|\?\?|!!|restore[ :\.\)]|restored[ :\.\)]|restoring[ :\.\)]/i) !=-1 || the_sum.search(/(Should|should|Is|is) not |should(nt|n't) |c(an't|annot) |(un|n)ecessary |no need[ :\.\)]|Abuse of |admin powers | violat(e|es|ed) | policy| standards| doesn't| your | you're| yours| you | aren't| isn't| stop[ :\.\)]| not|please[ :\.\)]|[ :\.\)]please|can't|cant|why[ :\.\)]| the talk page| (see|to) talk/i) !=-1) {         Superfic = 'no'; Notable = 'no'; Significant = 'no'; Minor_nonrv = -1; Revert = 'yes'; R = R + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + rvlink + ') #' + R;           } } //non-article reverts else if (Namespace_type != 'article' && Sum_value == 1 && the_sum.search('rotect(ed| )') == -1) {       if (the_sum.search(/\((RVv|Rvv|rVv|-[ -]rv|rv|R[Vv]|RV|rev|rest|restore|Rv|rv|RrV|Rrv)[ :;\)]|BOT - Revert|BOT - [Rr]v\. |BOT - [Rr]v |reverted edits by /) !=-1 || the_sum.search(/[ \(]rever(t|ted|ting)[ :;\)](comment|note|reply|resp|rude|incivil|personal|edits by|changes by)|reversion|graffitti| nonsense|vandal edit|rollback[ :\.\)]| irrelevant|(t|ed|e) vandal|linkspam|remov(ed|ing)|delet(ed|ing) |reinsta(t|ted)|restore(d) |(un|n)ecessary /i) !=-1)           {          Minor_nonrv = -1;          Revert = 'yes';          R = R + 1;          if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + rvlink + ') #' + R;            }        } //superficial check pass 1 (main)      if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Superfic == 'no')           {      if (the_sum.search(/>|<|\+|\([Mm]ove|\([Nn]eeds |\([Nn]eed | -|to-|#|\.\.\.|\([Mm][\.;:\)]| [Mm][\.;:\)]|\[\[|\{\{/) !=-1 || the_sum.search(/\(no[ :\.\)]|\(clean|grammar|lnk[ :\.\)]| lnk|punc[ :\.\)]|(gramatical|grammar|syntax|spelling) (error|typo|correct|fix)/i) !=-1 || the_sum.search(/ [Cc]lean(up|ing)[\.;:\)]| cleanup| punct[ :\.\)]|re-cat[ :\.\)]|recat[ :\.\)]|[Aa]ssisted[ :\.\)]| format|[Ff]rmt[\.\)]| linked|template|tmplt| abbr|Abbr|Disambig|disambig|[\( ]Dab[\.;:\)]|[\( ]dab[\.;:\)]|[\( ]DAB[\.;:\)]| odering| spelling|spelling[ \.:\)]| typo|typo\)| word| tag|place[ :\.\)]|bad[ :\.\)]|can[ :\.\)]|word[\.;:\)]|tag[\.;:\)]|place[\.;:\)]|bad[\.;:\)]|[Oo]{1,5}[Pp][Ss]/) !=-1 || the_sum.search(/for [Dd]eletion| AFD| Afd| CSD| CfSD| belong |[Pp]ointless|[Nn]eedless|[Rr]eplacement/) !=-1 || the_sum.search(/AWB|REDIR| redir[ :\.\)]|[Rr]edir(ect|ing)| skip[ :\.\)]| interwiki[ :\.\)]|[Ss]horten[ :\.\)]|compress[ :\.\)]|convert[ :\.\)]| rid[ :\.\)]|Auto |[Bb]ypass /) !=-1 || the_sum.search(/convert[ :\.\)]| sentence[ :\.\)]|easier[ :\.\)]|simplify|simpler[ :\.\)]| version|version\)|robot:/i) !=-1 || the_sum.search(/small|shorten|avoid|epair|few[ :\.\)]|protected[ :\.\)]| heading| title|made[ :\.\)]| bold|populating[ :\.\)]| flag /i) !=-1 || the_sum.search(/auto[ :\.\)]|html[ :\.\)]|already[ :\.\)]|almost[ :\.\)]| cut[ :\.\)]| paste[ :\.\)]| tweak|mov(e|ed|ing) /i) !=-1 || the_sum.search(/(changing|modify|modified|modifying|tweaking) (links|layout|format|setup|interwiki)|chang(e|ing) to/i) !=-1 || the_sum.search(/Stub-| sorting|-sorting|You can help!|see[- ]also| adjectives|adjectives[\.;:\)]|categorize|categorizing|[ \(]fix[ \.:\)]|[ \(]fixed[ \.:\)]|![\.;:\)]| match[ :\)]| others[ :\)]|\((No[ :\.\)]|no )/i) !=-1 || the_sum.search(/(added|add|changed|moved|modified) (wikilink|link|categor)/i) !=-1 || the_sum.search(/[Dd]ab[ \.:\)]|\([Ff]ix[ \.:\)]|[Ff]ix[ \.:\)]/) == 0) {         Minor_nonrv = 1; Minor = 'yes'; Careful = 'yes'; Superfic = 'yes'; Notable = 'no'; Significant = 'no'; }          } //superficial check pass 2 if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Superfic == 'no' && Careful == 'no') {       if (the_sum.search(/[Ww]ikif(y|ied)|[Cc]ategor(y|ize|ise)|(Fo|F|f|fo)rm(t|at)|-[Aa]ssisted|BOT|[Bb]ot |[Ss]tyle|[Mm]odif(y|ied|ying)/) !=-1 || the_sum.search(/re(structure|organiz|order)|clea(n|r)\)/i) !=-1 || the_sum.search(/clarif(y|ied)[ :\.\)]|replac(e|ed|ing)| conver(t|sion)|(re-)arrang(e|ed|ing) /i) !=-1 || the_sum.search(/ Request| request|WP:|[Ll]ink to |[Nn]eed(ed| )|[Ll]ink /) !=-1 || the_sum.search(/Fix| list|reorganize|correct| website| detail|this[ :\.\)]| this/i) !=-1 || the_sum.search(/ cat /) !=1 || the_sum.search(/[Rr]equest([ :\.\)]|ed[ :\.\)]|ing )/) !=-1 || the_sum.search(/!\)| ".+"| '.+'/) !=-1 || the_sum.search(/(article|page) (is|currently|undergoing)/) !=-1) {         Minor_nonrv = 1; Minor = 'yes'; Careful = 'yes'; Superfic = 'yes'; Notable = 'no'; Significant = 'no'; }          } //signifiant article edit pass 2 if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Careful == 'no') {       if (the_sum.search(/sub(cat|section)/i) !=-1 || the_sum.search(/ (not|NOT) | (is|IS) (not|NOT)/i) !=-1 || the_sum.search(/only|(P|p)lease /i) !=-1 || the_sum.search(/(merge[ :\.\)]|merge[\.;:\)]|small[ :\.\)]|minor[ :\.\)]|onvert[ :\.\)]| name| naming|additional[ :\.\)]|extra[ :\.\)]| few)/i) !=-1 || the_sum.search(/(infobox|small|(V|v)ersion)[ :\.\)]/i) !=-1 || the_sum.search(/factual|Factual|ording|eword[ :\.\)]|true| truth|correc(t|ted|ting) (date|data|info|facts)| didn| did not| cannot| could not/i) !=-1 || the_sum.search(/re(structure|-structure|organiz|order|-order)| sourcing\)| sources\)/i) !=-1 || the_sum.search(/( reference|ref\.|ref\))/i) !=-1 || the_sum.search(/(Write[ :\.\)]|write[ :\.\)]|New[ :\.\)]|new[ :\.\)]|image|photo|pictures)/i) !=-1) {         Minor_nonrv = 1; Minor = 'yes'; Significant = 'yes'; }          } //anything else left, marked as minor, is superficial if (Namespace_type == 'article' && Sum_value == 1 && Revert=='no' && Notable =='no' && Superfic=='no' && Significant == 'no' && Minor=='yes') {         Minor_nonrv = 1; Minor = 'yes'; Superfic = 'yes'; } //anything else left, not marked as minor, is small else if (Namespace_type == 'article' && Sum_value == 1 && Revert=='no' && Notable =='no' && Superfic=='no' && Significant == 'no' && Minor=='no') {         Minor_nonrv = 1; Significant = 'yes' Minor = 'yes'; } // //analysis if (Marked_as_minor == 'yes' && Revert == 'no' && Sum_value == 1){All_markedMin = All_markedMin + 1;} if (Marked_as_minor == 'no' && Revert == 'no' && Sum_value == 1){All_markedMaj = All_markedMaj + 1;} if (Namespace_type == 'article') {         ArticleE = ArticleE + 1; if (Minor_or_sum == -1){Minor = 'no'} //article edit summary use percent stuff if (Marked_as_minor == 'no' && i<1000 && contribs_first==true) {         sumart_edits += 1; Article_major_edits = Article_major_edits + 1; if (Sum_value == 1){Major_article_sum = Major_article_sum + 1;} }         else if (Marked_as_minor == 'yes' && i<1000 && contribs_first==true) {         sumart_edits += 1; Article_minor_edits = Article_minor_edits + 1; if (Sum_value == 1) {Minor_article_sum = Minor_article_sum + 1;} }         if (Superfic == 'yes') {Art_minor = Art_minor + 1;} if (Superfic == 'yes' && Marked_as_minor == 'no') {Artm_to_minor = Artm_to_minor + 1;} //sig. article edits if (Sum_value == -1 && Marked_as_minor == 'yes') {         ArtSf = ArtSf + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + sflink + ') #' + ArtSf; }         else if (Notable == 'yes' && Marked_as_minor == 'no') {         ArtSig = ArtSig + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + alink + ') #' + ArtSig; }         else if (Notable == 'yes' && Marked_as_minor == 'yes') {         ArtSig = ArtSig + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + malink + ') #' + ArtSig; }         else if (Superfic == 'yes' && Marked_as_minor == 'yes' && Sum_value == 1) {         ArtSf = ArtSf + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + sflink + ') #' + ArtSf; }         else if (Superfic == 'yes' && Marked_as_minor == 'no' && Sum_value == 1) {         ArtSf = ArtSf + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + sflink2 + ') #' + ArtSf; }         else if (Superfic == 'no' && Minor == 'yes' && Significant == 'yes' && Sum_value == 1 && Revert == 'no') {         ArtM = ArtM + 1; if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + minalink + ') #' + ArtM; }            } //overall for edit percent usage (up 1000 only) if (Marked_as_minor == 'yes' && i<1000 && contribs_first==true) {           sum_edits += 1; Is_minor = Is_minor + 1; if (Sum_value == 1) {Minor_withsum = Minor_withsum + 1;} }         else if (Marked_as_minor == 'no' && i<1000 && contribs_first==true) {           sum_edits += 1; Not_minor = Not_minor + 1; if (Sum_value == 1) {Major_withsum = Major_withsum + 1;} } //done if (Minor_nonrv == 1) {             M = M + 1; if (Marked_as_minor == 'yes' && Superfic == 'no') {if (STATS_ALL_JS_RAN == false) l[i].innerHTML += ' (' + mslink + ') #' + M;} }      }      else {blk_num += 1;} } //END of FOR loop if (i == 1) { document.getElementById('contentSub').innerHTML = ' There are no contribution statistics to show since there is only one edit. '; return; } EC_tot += i; //NOTE: the max edits per iteration MUST be higher than Max_Eforsum for this method to hold //Currently, it is 2000, in User:Voice of All/JS/count.js if (contribs_first==true) { var ave_tot=i; current_date = new Date; current_date = current_date.toUTCString.replace(/GMT/, "UTC"); first_date = l[0].innerHTML.split('(<a href=')[0].split('<a href=')[0].split('<A HREF=')[0]; last_date_f = l[i-1].innerHTML.split('(<a href=')[0].split('<a href=')[0].split('<A HREF=')[0]; totdays_first = getDateDiff(current_date,last_date_f); totdays_frame = getDateDiff(first_date,last_date_f); average = ave_tot/totdays_first; faverage = ave_tot/totdays_frame; //Check up to 1000 edits, may redefine average edits/day var Max_Eforsum = 1000; if (ave_tot>Max_Eforsum && contribs_first==true) {    ave_tot = Max_Eforsum; yearloc = l[Max_Eforsum-1].innerHTML.split(' <a href=')[0].split('<A HREF=')[0]; totdays_first = getDateDiff(current_date,yearloc); totdays_frame = getDateDiff(first_date,yearloc); average = ave_tot/totdays_first; faverage = ave_tot/totdays_frame; } } // if (STATS_ALL_JS_RAN==true) { contribs_first=false; if (contribs_done==false) get_contribs_chain; } if (STATS_ALL_JS_RAN==false || contribs_done==true) { E = EC_tot; last_date = l[i-1].innerHTML.split('(<a href=')[0].split('<a href=')[0].split('<A HREF=')[0]; framedays = getDateDiff(first_date,last_date); totdays = getDateDiff(current_date,last_date); var Daylength = Math.round((1)*framedays)/1; if (Daylength == 0) Daylength = 1; var Dayspassed = Math.round((1)*totdays)/1;  if (Dayspassed == 0) Dayspassed = 1; average = Math.round((100)*average)/100; faverage = Math.round((100)*faverage)/100; var avenotice = ''; //wow..statistics people var caverage = Math.round((1000)*caverage)/1000; // var TimeDATE = ' Time range: ' + Daylength + ' approximate day(s) of edits on this page (' + Dayspassed + ' day(s) passed since first edit)  ' + 'Current time: ' + current_date + ' || ' + 'Last edit: ' + first_date + ' || ' + 'Oldest edit: ' + last_date + ' '; // if (location.href.split("&offset=")[1] != undefined) {  if (location.href.split("&offset=0")[1] != undefined) {  var offset = 'no'; } else { Uploads = ' [Value unknown]* '; average = ' [Value unknown]* '; avenotice = ' *Average edits per day (and uploads) not shown because the most recent edit is not visible '; TimeDATE = ''; var offset = 'yes'; } } if (edits_page_compared_js == 1) { rights_status =''; Uploads = ' [Value unknown]* '; average = ' [Value unknown]* '; faverage = ' [Value unknown]* '; avenotice = ' *Average edits per day (and uploads) not shown because their are multiple users '; TimeDATE = ''; } var tot_moves = Moves + Dummy_Moves; var U_edits = UM; var FAQ = '<a href="http://en.wikipedia.org/wiki/User:Voice_of_All/History_analysis_JS_Definitions_and_FAQ" title="HistoryFAQ"> (FAQ) </a>'; oldbody = document.getElementById('bodyContent').innerHTML; // document.getElementById('contentSub').innerHTML += ' Viewing contribution data for ' + theusername + rights_status + ' (over the ' + E + ' edit(s) shown on this page) ' + FAQ; // MAIN_NS = 'Article'; PORTAL_NS = 'Portal'; WIKIPEDIA_NS = 'Wikipedia'; if (wgServer == "http://commons.wikimedia.org"){PORTAL_NS = 'Creator'; WIKIPEDIA_NS = 'Commons'; MAIN_NS = 'Gallery';} document.getElementById('bodyContent').innerHTML = ' ' + document.getElementById('contentSub').innerHTML + ' ' + TimeDATE + ' Overall edit summary use (last ' + sum_edits + ' edits): ' + ' Major edits: ' + Math.round((100)*(100*(Major_withsum/Not_minor)))/100 + ' % ' + ' Minor edits: ' + Math.round((100)*(100*(Minor_withsum/Is_minor)))/100 + ' % ' + ' Average edits per day: ' + average + ' (currently, for last ' + ave_tot + ' edit(s)) ' + ' Average edits per day: ' + faverage + ' (since last active, for last ' + ave_tot + ' edit(s)) ' + ' Article edit summary use (last ' + sumart_edits + ' edits): ' + ' Major article edits: ' + Math.round((100)*(100*(Major_article_sum/Article_major_edits)))/100 + ' % ' + ' Minor article edits: ' + Math.round((100)*(100*(Minor_article_sum/Article_minor_edits)))/100 + ' % '+ ' Encyclopedia contributions (out of all ' + E + ' edits shown on this page and last ' + Uploads_length + ' image uploads): ' + ' Notable article edits (creation/expansion/major rewrites/sourcing): ' + Math.round((100)*(100*(ArtSig)/E))/100 + ' % (' + ArtSig + ') ' + ' Significant article edits (copyedits/small rewrites/content/reference additions): ' + Math.round((100)*(100*(ArtM)/E))/100 + ' % (' + ArtM + ') ' + ' Superficial article edits (grammar/spelling/wikify/links/tagging): ' + Math.round((100)*(100*(ArtSf)/E))/100 + ' % (' + ArtSf + ') ' + ' Unique image uploads (non-deleted/reverts/updates): ' + Uploads + ' (checks last 5000) ' + ' Superficial article edits marked as minor: ' + Math.round((100)*(100*(Art_minor-Artm_to_minor)/Art_minor))/100 + ' % ' + ' Project contributions (as marked):  ' + ' Articles for Creation: ' + Math.round((100)*(100*(AfC_tot)/E))/100 + ' % (' + AfC_tot + ' edit(s)) ' + ' Pages for Deletion: ' + Math.round((100)*(100*(XfD_tot)/E))/100 + ' % (' + XfD_tot + ' edit(s)) ' + ' Copyright problems pages: ' + Math.round((100)*(100*(CP_tot)/E))/100 + ' % (' + CP_tot + ' edit(s)) ' + ' WP:AN/related noticeboards: ' + Math.round((100)*(100*(AN_tot)/E))/100 + ' % (' + AN_tot + ' edit(s)) ' + ' Bot approvals pages: ' + Math.round((100)*(100*(BOT_tot)/E))/100 + ' % (' + BOT_tot + ' edit(s)) ' + ' FA/FP/FL candidate pages: ' + Math.round((100)*(100*(FAC_tot)/E))/100 + ' % (' + FAC_tot + ' edit(s)) ' + ' RfC/RfAr pages: ' + Math.round((100)*(100*(RAfC_tot)/E))/100 + ' % (' + RAfC_tot + ' edit(s)) ' + ' Requests for adminship: ' + Math.round((100)*(100*(RfA_tot)/E))/100 + ' % (' + RfA_tot + ' edit(s)) ' + ' Identified RfA votes: ' + Math.round((100)*(100*(1*RfA_votes_S + 1*RfA_votes_O)/E))/100 + ' % (' + RfA_votes_S + ' support vote(s)) ' + ' || ' + ' (' + RfA_votes_O + ' oppose vote(s)) ' + ' User warnings: ' + Math.round((100)*(100*(User_warnings)/E))/100 + ' % (' + User_warnings + ' edit(s)) ' + ' User welcomes: ' + Math.round((100)*(100*(User_welcomes)/E))/100 + ' % (' + User_welcomes + ' edit(s)) ' + ' Special edit type statistics (as marked):  ' + ' Page moves: ' + Math.round((100)*(100*(tot_moves)/E))/100 + ' % (' + tot_moves + ' edit(s)) (' + Moves + ' moves(s)) ' + ' Page redirections: ' + Math.round((100)*(100*(Redirects)/E))/100 + ' % (' + Redirects + ' edit(s)) ' + ' Page (un)protections: ' + Math.round((100)*(100*(Protections)/E))/100 + ' % (' + Protections + ' edit(s)) ' + ' AutoWikiBrowser edits: ' + Math.round((100)*(100*(AWB_edits)/E))/100 + ' % (' + AWB_edits + ' edit(s)) ' + ' Breakdown of all edits:  ' + ' Unique pages edited: ' + Unique_pages + ' | ' + 'Average edits per page: ' + Math.round(100*E/Unique_pages)/100 + ' | ' + 'Edits on top: ' + Math.round((100)*(100*(TE)/E))/100 + ' % ' + ' Edits marked as major (non-minor/reverts): ' + Math.round((100)*(100*(All_markedMaj)/E))/100 + ' % (' + All_markedMaj + ' edit(s)) ' + ' Edits marked as minor (non-reverts): ' + Math.round((100)*(100*(All_markedMin)/E))/100 + ' % (' + All_markedMin + ' edit(s)) ' + ' Marked reverts (reversions/text removal): ' + Math.round((100)*(100*(R)/E))/100 + ' % (' + R + ' edit(s)) ' + ' Unmarked edits with no summary: ' + Math.round((100)*(100*(UM)/E))/100 + ' % (' + U_edits + ' edit(s)) ' + ' Edit count by namespace:  ' + MAIN_NS + ': ' + Math.round((100)*(100*(ArticleE)/E))/100 + ' % (' + ArticleE + ') | ' + MAIN_NS + ' talk: ' + Math.round((100)*(100*(Talk)/E))/100 + ' % (' + Talk + ') ' + ' User: ' + Math.round((100)*(100*(User)/E))/100 + ' % (' + User + ') | User talk: ' + Math.round((100)*(100*(Usertalk)/E))/100 + ' % (' + Usertalk + ') ' + ' ' + WIKIPEDIA_NS + ': ' + Math.round((100)*(100*(Wikipedia)/E))/100 + ' % (' + Wikipedia + ') | ' + WIKIPEDIA_NS + ' talk: ' + Math.round((100)*(100*(Wikipediatalk)/E))/100 + ' % (' + Wikipediatalk + ') ' + ' Image: ' + Math.round((100)*(100*(Images)/E))/100 + ' % (' + Images + ') | Image talk: ' + Math.round((100)*(100*(ITalk)/E))/100 + ' % (' + ITalk + ') ' + ' Template: ' + Math.round((100)*(100*(Template)/E))/100 + ' % (' + Template + ') | Template talk: ' + Math.round((100)*(100*(TTalk)/E))/100 + ' % (' + TTalk + ') ' + ' Category: ' + Math.round((100)*(100*(Category)/E))/100 + ' % (' + Category + ') | Category talk: ' + Math.round((100)*(100*(CTalk)/E))/100 + ' % (' + CTalk + ') ' + ' ' + PORTAL_NS + ': ' + Math.round((100)*(100*(Portal)/E))/100 + ' % (' + Portal + ') | ' + PORTAL_NS + ' talk: ' + Math.round((100)*(100*(PTalk)/E))/100 + ' % (' + PTalk + ') ' + ' Help: ' + Math.round((100)*(100*(Help)/E))/100 + ' % (' + Help + ') | Help talk: ' + Math.round((100)*(100*(HTalk)/E))/100 + ' % (' + HTalk + ') ' + ' MediaWiki: ' + Math.round((100)*(100*(Mediawiki)/E))/100 + ' % (' + Mediawiki + ') | MediaWiki talk: ' + Math.round((100)*(100*(MTalk)/E))/100 + ' % (' + MTalk + ') ' + avenotice + oldbody.split('')[1]; var body = document.getElementById('bodyContent'); if (STATS_ALL_JS_RAN == false) {   body.ranSetupTooltipsAlready=false; setupTooltips(body); }   else {body.getElementsByTagName('ul')[0].innerHTML='';} } } //END

//Vandal and IP stats function histstats { if (document.getElementById('contentSub').innerHTML.search(/Viewing page modification statistics |There are no page modification statistics |Analyzing history...please wait/) !=-1) {alert("Results already shown."); return;} // var Namespace_type = 'non-article'; var Namespace = document.title.split(' - ')[0]; if (Namespace.search('(Image:|Template:| talk:|Category:|Portal:|Wikipedia:|MediaWiki:|Help:|Talk:|User:|View and restore deleted pages)') == -1) {Namespace_type = 'article';} //tagging edits var rvlink = ' rv '; var vanlink = ' likely rvv '; var revlink = ' reverted '; var nslink = ' no summary '; var mslink = ' minor '; var sflink = ' superficial '; var mamlink = ' minor '; var tplink = ' most recent ' var umplink = ' unmarked ' var alink = ' notable '; var malink = ' notable! '; var minalink = ' significant '; var botlink = ' bot '; var syslink = ' sysop '; var nutlink = ' no user pages '; var ntlink = ' blank talk page '; var nulink = ' blank userpage '; var iplink = ' IP edit '; var iplink = ' IP edit '; var nslink = ' no summary '; // var firstbody = document.getElementById('bodyContent').innerHTML; var oldloc = location.href; // var IP_nonreverts = 0; var Newbie_edits = 0; var Newbie_nonreverts = 0; var Reverted = 0; var R = 0; var V = 0; var IP = 0; var VN = 0; var NU = 0; var UM = 0; var NS = 0; var SYS = 0; var BOT = 0; var undelete = 'no'; var username = ''; var Users = 0; var ArtSig = 0; var ArtSf = 0; var ArtRv = 0; var ArtM = 0; var ArtUM =0; var c = document.getElementById('contentSub'); var a = c.getElementsByTagName('a'); l = document.getElementById('bodyContent').getElementsByTagName('ul')[0].getElementsByTagName('li'); if (location.href.indexOf('Special:Undelete') !=-1) {   undelete = 'yes'; l = document.getElementById('bodyContent').getElementsByTagName('ul')[1].getElementsByTagName('li'); if (!l[1]){alert('There is nothing to analyize!'); return;} nutlink = ' no user pages '; ntlink = ' blank talk page '; nulink = ' blank userpage '; iplink = ' IP edit '; } document.getElementById('contentSub').innerHTML += " Analyzing history...please wait "; // var now = new Date; var current_time = now.toUTCString.replace(/GMT/, "UTC"); var User_list = ''; var del_offset = 0; if (undelete == 'yes'){del_offset=2;} for (i = 0; i < l.length; i++) {     var Newbie = 0; var IP_user = 0; var Careful = 'no'; var Revert = 'no'; var RollbackE = 'no'; var Minor = 'no'; var Superfic = 'no'; var Notable = 'no'; var Significant = 'no'; var Minor_nonrv = -1; var Sum_value = -1; var Minor_or_sum = -1; var Marked_as_minor = 'no'; var sysop = 'no'; t = l[i].innerHTML; if (undelete == 'yes') {             username = l[i].getElementsByTagName('a')[1].innerHTML; }             else if (i == 0) {             username = l[i].getElementsByTagName('a')[2].innerHTML; }             else if (l[i].innerHTML.indexOf(') (last)') !=-1)              {              username = l[i].getElementsByTagName('a')[2].innerHTML;              }              else              {              username = l[i].getElementsByTagName('a')[3].innerHTML;              }          if (User_list.indexOf('|' + username + '|') == -1)          {Users += 1; User_list += '|' + username + '|';}          var autoc = 'no';          var the_sum = '';          for (k = 0 ; k < l[i].getElementsByTagName('span').length; k++)            {           if (l[i].getElementsByTagName('span')[k].className == 'minor')                   {                            Minor_nonrv = 1;                  Minor_or_sum = 1;                  Minor = 'yes';                  Marked_as_minor = 'yes';                  }           else if (l[i].getElementsByTagName('span')[k].className == 'autocomment') {                          autoc = 'yes'; if (l[i].getElementsByTagName('span')[k].innerHTML.indexOf(" -") !=-1) {                      Sum_value = 1; Minor_or_sum = 1; if (l[i].getElementsByTagName('span')[k-1].innerHTML.indexOf("- ") !=-1) {the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML.split("- ")[1].split(") ")[0];}                else if (l[i].getElementsByTagName('span')[k-1].innerHTML.indexOf("- ") !=-1)                 {the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML.split("- ")[1].split(" ")[0];}                 else if (l[i].getElementsByTagName('span')[k-1].innerHTML.indexOf(" ") !=-1)                 {the_sum = l[i].getElementsByTagName('span')[k-1].innerHTML.split(" ")[1].split(" ")[0];}                  break;                      }                  else                      {                           Sum_value = -1;                      if (Minor == 'no')                        {Minor_or_sum = -1;}                      }                  break;                  }           else if (l[i].getElementsByTagName('span')[k].className == 'comment')                   { Sum_value = 1; Minor_or_sum = 1; var Careful = 'no'; the_sum = l[i].getElementsByTagName('span')[k].innerHTML; }           } //End of k loop //remove links raw_sum = the_sum; the_sum = the_sum.replace(/<a href=[^\]]+<.a>/ig,'');

//            if (Minor_or_sum  == -1) {               NS = NS + 1; UM = UM + 1; l[i].innerHTML += ' (' + umplink + ') #' + UM; }            else if (Sum_value == -1) {               NS = NS + 1; l[i].innerHTML += ' (' + nslink + ') #' + NS; }            if (theadminlist.indexOf('|' + username + '|') !=-1) {               SYS = SYS + 1; sysop = 'yes'; l[i].innerHTML += ' (' + syslink + ') #' + SYS; }            else if (thervbotlist.indexOf('|' + username + '|') !=-1) {               BOT = BOT + 1; l[i].innerHTML += ' (' + botlink + ') #' + BOT; } //vandal rollbacks if (the_sum.search(/\((rvv|Rvv|RVV|RvV|RV V|rv v)/) !=-1 || the_sum.search(/reverted edits|Popups assisted reversion|reverted vandalism|revert to revision|to last version by|compromise the integrity|troll(s|ing)\)/i) !=-1 || the_sum.search(/BOT - rv|BOT - Reverted|vandal edit/i) !=-1 || the_sum.search(/(rv|Rv|RV) vandalism|\(rv\/v\)/i) !=-1) {         V += 1; l[i].innerHTML += ' (' + vanlink + ') #' + V;         R += 1; l[i].innerHTML += ' (' + rvlink + ') #' + R;         Superfic = 'no'; Notable = 'no'; Significant = 'no'; Minor_nonrv = -1; Revert = 'yes'; RollbackE = 'yes'; } //page rollbacks else if (the_sum.search(/[\( ]([Rr]everted edit|[Rr]everted \d+ edit|rv|Rv|RV|[Rr]evert|[Rr]ollback|[Rr]olling )/) !=-1 || the_sum.search(/revert[ |:|\.|\;)]|reverting[ |:|\.|\);]|reverted[ |:|\.|\);]|rollback[ |:|\.|\);]/i) !=-1)           {          R += 1;          l[i].innerHTML += ' (' + rvlink + ') #' + R;          Superfic = 'no';          Notable = 'no';          Significant = 'no';          Minor_nonrv = -1;          Revert = 'yes';          RollbackE = 'yes';            } //vandal reverts        else if (the_sum.search(/(Rm|rm|Remove|remove) (vandalism|test|nonsense)|remove vandalism|removed vandalism|rmv graffitti|rm graffitti|rv graffitti|reverting vandal|compromise the integrity/i) !=-1 || the_sum.search(/fixed vandalism|Revert vandal|revert vandal|delete vandal|linkspam| vandalism|vandals | vandal/i) !=-1 || the_sum.search(/(Rev|rev) vandal|\(vandal|\(trolling/) !=-1 || the_sum.search(/\((Revert|trolls|trolling)\)/) !=-1) {         V += 1; l[i].innerHTML += ' (' + vanlink + ') #' + V;         R += 1; l[i].innerHTML += ' (' + rvlink + ') #' + R;         Superfic = 'no'; Notable = 'no'; Significant = 'no'; Minor_nonrv = -1; Revert = 'yes'; } //page reverts else if (the_sum.search(/Restoring |[Rr]evert|[Rr]estore[ :\.\)]|[Rr]estoring[ :\.\)]|[Rr]estored[ :\.\)]|Rm[ :\.\)]|rm[ :\.\)]|einstated[ :\.\)]|rmv[ :\.\)]|[Rr]einstate[ :\.\)]|rv\.|POINT/) !=-1 || the_sum.search(/delete[ |:|\.|]|deleted[ |:|\.]|remove[ :\)]|removing[ :\)]|reinstated|reinstate/i) !=-1 || the_sum.search(/restore[ :\.\)]|estored[ :\.\)]/i) !=-1 || the_sum.search(/re-added|re-inserted|added \w{5,20} again |added back /i) !=-1 || the_sum.search(/back again|no such | such thing| agree with[ :\.\)]| don't[ :\.\)]| do not[ :\.\)]|\(surely[ :\.\)]|no need[ :\.\)]|\?\)/i) !=-1)           {          R += 1;          l[i].innerHTML += ' (' + rvlink + ') #' + R;          Superfic = 'no';          Notable = 'no';          Significant = 'no';          Minor_nonrv = -1;          Revert = 'yes';            } //long summary article reverts   else if (Namespace_type == 'article' && Sum_value == 1 && the_sum.search('(P|p)rotect(ed| )') == -1 && the_sum.length > 25) {       if (the_sum.search(/remove[ :\.\)]|removed[ :\.\)]|[ :\)]remove|[ :\)]removed|seriously[ :\.\)]|WTF[ :\.\)]|\?\?|!!|restore[ :\.\)]|restored[ :\.\)]|restoring[ :\.\)]/i) !=-1 || the_sum.search(/(Should|should|Is|is) not |should(nt|n't) |c(an't|annot) |(un|n)ecessary |no need[ :\.\)]|Abuse of |admin powers | violat(e|es|ed) | policy| standards| doesn't| your | you're| yours| you | aren't| isn't| stop[ :\.\)]| not|please[ :\.\)]|[ :\.\)]please|can't|cant|why[ :\.\)]| the talk page| (see|to) (talk|discussion)/i) !=-1) {         R += 1; l[i].innerHTML += ' (' + rvlink + ') #' + R;         Superfic = 'no'; Notable = 'no'; Significant = 'no'; Minor_nonrv = -1; Revert = 'yes'; }       } //reverted edit flagging if (Revert == 'yes' && l[i].innerHTML.indexOf(revlink) !=-1) {Reverted = Reverted-1; l[i].innerHTML = l[i].innerHTML.replace(revlink,'');} else {l[i].innerHTML = l[i].innerHTML.replace(revlink,' ( ' + revlink + ' ) ');} //typical rollbacks if (RollbackE == 'yes' && l[i+1] != undefined && raw_sum.search(/ \d{6,10}( dated .+ | )by .+ using <[Aa] href/) ==-1) {     var badname = l[i+1].getElementsByTagName('a')[3-del_offset].innerHTML; var uname=''; for (var h=i+1; h<l.length; h++) {        uname = l[h].getElementsByTagName('a')[3-del_offset].innerHTML; if (l[h].innerHTML.indexOf(') (last)') == -1 && l[h].innerHTML.indexOf(revlink) == -1 && uname == badname)              {               Reverted += 1;               l[h].innerHTML += revlink;               }         else {break;}         }       } //popups rev support, VP && VS   else if (Revert == 'yes' && l[i+1] != undefined && raw_sum.search(/ \d{6,10}( dated .+ | )by .+ using <[Aa] href=/i) !=-1)      {      var goodname = raw_sum.match(/ \d{6,10}( dated .+ | )by .+ using <[Aa] href=/i)[0].split(' by ')[1].split(' using <A ')[0].split(' using <a ')[0];      var uname=''; var z=0; //user renames or deleted revs or other flukes can skrew this up, set a 20 edit revert limit      for (var h=i+1; h<l.length; h++)         {         uname = l[h].getElementsByTagName('a')[3-del_offset].innerHTML         if (l[h].innerHTML.indexOf(') (last)') == -1 && uname != goodname) {              z+=1; if (z==21) {l[h].innerHTML += ' [excessive revert to rev by "' + goodname + '"]'; z=1; break;} }        else break; }     for (var h=i+1; h<i+1+z; h++) {        if (l[h].innerHTML.indexOf(revlink) == -1) {              Reverted += 1; l[h].innerHTML += revlink; }        }      } //flag protection events if (l[i].innerHTML.search(/\[(edit|move)=(autoconfirmed|sysop)|class="comment">\(Unprotected /) !=-1)   {l[i].innerHTML = ' ' + l[i].innerHTML + ' ';} // if (Namespace_type == 'article') { //first edit is a notable edit   if (l[i].innerHTML.indexOf(') (last)') !=-1) {Careful = 'yes'; Minor = 'no'; Minor_nonrv = -1; Notable = 'yes';} else if (Sum_value == 1 && Revert == 'no') { //notable edits if (the_sum.search(/ created[\.;:\)]|create[\.;:\)]| creation[\.;:\)]|rastic addition|rastic edit|rastic cha|rastic mod|expansion |rewriting[:\.\)]|rewrote[ :\.\)]|(rewriting|rewrite|rewrote)[ :\.\)](completely|page|article|bio)|(major|large|significant) (section|addition|rewrite)/i) !=-1 || the_sum.search(/(add )(a | )(lot|large|tons|great|signif)|(write|create|initial|start|begin) (brand|new|article|page)|major (ed|ch|mod)|interim save|\(expand(ed|ing)(page|article|stub|bio)|[ \(]expan(d|ed|ing)[ :\.\)]|contin(uing|ued) (addition|expand|expans|writ)/i) !=-1 || the_sum.search(/(\+|(add|added|adding|more|elaborate)[ :\.\)]|create |another )(history|paragraph|section|references|sources|sourcing|citations|refs|photos|images|pictures)/i) !=-1 || the_sum.search(/(create|created|creating|made|making|quick|\(new|start|begin|started|starting)( new | this | )(stub|basic|initial|article|page|bio|section|paragr|draft)/i) !=-1 || the_sum.search(/(added|adding) (basic|initial|biog|section|paragr|details)|creat(e|ed|ing) (page|section|article|biog)/i) !=-1 || the_sum.search(/(references| sources| sourced|citations) add|(\(|^)(sources|additional|reference|source|citation|refs|photos|images|ictures|pics)\)/i) !=-1 || the_sum.search(/\((create[\.;:\)]|created[\.;:\)]|creation[\.;:\)]|de novo[\.;:\)]|bio[\.;:\)]|biography[\.;:\)]|begin[\.;:\)]|start[\.;:\)]|article[\.;:\)]|page\))/i) !=-1) {Careful = 'yes'; Minor = 'no'; Minor_nonrv = -1; Notable = 'yes';} //significant edit pass 1 else if (the_sum.search(/Info|Content|addition[\.;:\)]|addition[\.;:\)]| facts|facts\)|^add\)| facts|\(add[\.;:\)]|(quotes|fact|xample|xpand|ompromise| accurate| sentence[ :\.\)]| about)/i) !=-1 || the_sum.search(/biography|(ade|reate) article\)|creat(e|ion) |copyedit|descri(ption|be)/i) !=-1 || the_sum.search(/(add|finish|finishing|finished|more|\+|another)([ :\.\)]|)(reference|citation|source|info|content|image|photo|pic|section)/i) !=-1 || the_sum.search(/(reference|itation|source|info|content|image|photo|pictures) (added|included|create|uploaded)/i) !=-1 || the_sum.search(/\((create|created|creating) |(\(|^)(source|blurb|note|addition|reference|sources|citation|ref|photo|image|icture|pic|more)\)/i) !=-1 || the_sum.search(/(rewriting[ :\.\)]|rewrite[ :\.\)]|rewrote[ :\.\)])(section|lead|intro|paragraph)/i ) !=-1 || the_sum.search(/\(([^ ])+ (note|blurb|data|sourcing)\)/i) !=-1 || the_sum.search(/^(\(| )( |)(note|blurb|data|sourcing)\)/i) !=-1) {Careful = 'yes'; Minor = 'yes'; Significant = 'yes'; Minor_nonrv = 1;} //summary rules else if (autoc == 'no' && the_sum.length < 12) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (autoc == 'yes' && the_sum.length < 10) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length ==1) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1; Careful = 'yes';} else if (the_sum.split(' ').length ==2) {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length < 3 && Minor == 'no') {Minor = 'yes'; Significant = 'yes'; Minor_nonrv = 1;} else if (the_sum.split(' ').length < 3 && Minor == 'yes') {Minor = 'yes'; Superfic = 'yes'; Minor_nonrv = 1;} } //superficial check pass 1 (main) if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Superfic == 'no') {     if (the_sum.search(/>|<|\+|\([Mm]ove|\([Nn]eeds |\([Nn]eed | -|to-|#|\.\.\.|\([Mm][\.;:\)]| [Mm][\.;:\)]|\[\[|\{\{/) !=-1 || the_sum.search(/\(no[ :\.\)]|\(clean|grammar|lnk[ :\.\)]| lnk|punc[ :\.\)]|(gramatical|grammar|syntax|spelling) (error|typo|correct|fix)/i) !=-1 || the_sum.search(/ [Cc]lean(up|ing)[\.;:\)]| cleanup| punct[ :\.\)]|re-cat[ :\.\)]|recat[ :\.\)]|[Aa]ssisted[ :\.\)]| format|[Ff]rmt[\.\)]| linked|template|tmplt| abbr|Abbr|Disambig|disambig|[\( ]Dab[\.;:\)]|[\( ]dab[\.;:\)]|[\( ]DAB[\.;:\)]| odering| spelling|spelling[ \.:\)]| typo|typo\)| word| tag|place[ :\.\)]|bad[ :\.\)]|can[ :\.\)]|word[\.;:\)]|tag[\.;:\)]|place[\.;:\)]|bad[\.;:\)]|[Oo]{1,5}[Pp][Ss]/) !=-1 || the_sum.search(/for [Dd]eletion| AFD| Afd| CSD| CfSD| belong |[Pp]ointless|[Nn]eedless|[Rr]eplacement/) !=-1 || the_sum.search(/AWB|REDIR| redir[ :\.\)]|[Rr]edir(ect|ing)| skip[ :\.\)]| interwiki[ :\.\)]|[Ss]horten[ :\.\)]|compress[ :\.\)]|convert[ :\.\)]| rid[ :\.\)]|Auto |[Bb]ypass /) !=-1 || the_sum.search(/convert[ :\.\)]| sentence[ :\.\)]|easier[ :\.\)]|simplify|simpler[ :\.\)]| version|version\)|robot:/i) !=-1 || the_sum.search(/small|shorten|avoid|epair|few[ :\.\)]|protected[ :\.\)]| heading| title|made[ :\.\)]| bold|populating[ :\.\)]| flag /i) !=-1 || the_sum.search(/auto[ :\.\)]|html[ :\.\)]|already[ :\.\)]|almost[ :\.\)]| cut[ :\.\)]| paste[ :\.\)]| tweak|mov(e|ed|ing) /i) !=-1 || the_sum.search(/(changing|modify|modified|modifying|tweaking) (links|layout|format|setup|interwiki)|chang(e|ing) to/i) !=-1 || the_sum.search(/Stub-| sorting|-sorting|You can help!|see[- ]also| adjectives|adjectives[\.;:\)]|categorize|categorizing|[ \(]fix[ \.:\)]|[ \(]fixed[ \.:\)]|![\.;:\)]| match[ :\)]| others[ :\)]|\((No[ :\.\)]|no )/i) !=-1 || the_sum.search(/(added|add|changed|moved|modified) (wikilink|link|categor)/i) !=-1 || the_sum.search(/[Dd]ab[ \.:\)]|\([Ff]ix[ \.:\)]|[Ff]ix[ \.:\)]/) == 0) {         Minor_nonrv = 1; Minor = 'yes'; Careful = 'yes'; Superfic = 'yes'; Notable = 'no'; Significant = 'no'; }          } //superficial check pass 2 if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Superfic == 'no' && Careful == 'no') {       if (the_sum.search(/[Ww]ikif(y|ied)|[Cc]ategor(y|ize|ise)|(Fo|F|f|fo)rm(t|at)|-[Aa]ssisted|BOT|[Bb]ot |[Ss]tyle|[Mm]odif(y|ied|ying)/) !=-1 || the_sum.search(/re(structure|organiz|order)|clea(n|r)\)/i) !=-1 || the_sum.search(/clarif(y|ied)[ :\.\)]|replac(e|ed|ing)| conver(t|sion)|(re-)arrang(e|ed|ing) /i) !=-1 || the_sum.search(/ Request| request|WP:|[Ll]ink to |[Nn]eed(ed| )|[Ll]ink /) !=-1 || the_sum.search(/Fix| list|reorganize|correct| website| detail|this[ :\.\)]| this/i) !=-1 || the_sum.search(/ cat /) !=1 || the_sum.search(/[Rr]equest([ :\.\)]|ed[ :\.\)]|ing )/) !=-1 || the_sum.search(/!\)| ".+"| '.+'/) !=-1 || the_sum.search(/(article|page) (is|currently|undergoing)/) !=-1) {         Minor_nonrv = 1; Minor = 'yes'; Careful = 'yes'; Superfic = 'yes'; Notable = 'no'; Significant = 'no'; }          } //signifiant article edit pass 2 if (Namespace_type == 'article' && Sum_value == 1 && Revert == 'no' && Careful == 'no') {       if (the_sum.search(/sub(cat|section)/i) !=-1 || the_sum.search(/ (not|NOT) | (is|IS) (not|NOT)/i) !=-1 || the_sum.search(/only|(P|p)lease /i) !=-1 || the_sum.search(/(merge[ :\.\)]|merge[\.;:\)]|small[ :\.\)]|minor[ :\.\)]|onvert[ :\.\)]| name| naming|additional[ :\.\)]|extra[ :\.\)]| few)/i) !=-1 || the_sum.search(/(infobox|small|(V|v)ersion)[ :\.\)]/i) !=-1 || the_sum.search(/factual|Factual|ording|eword[ :\.\)]|true| truth|correc(t|ted|ting) (date|data|info|facts)| didn| did not| cannot| could not/i) !=-1 || the_sum.search(/re(structure|-structure|organiz|order|-order)| sourcing\)| sources\)/i) !=-1 || the_sum.search(/( reference|ref\.|ref\))/i) !=-1 || the_sum.search(/(Write[ :\.\)]|write[ :\.\)]|New[ :\.\)]|new[ :\.\)]|image|photo|pictures)/i) !=-1) {         Minor_nonrv = 1; Minor = 'yes'; Significant = 'yes'; }          } //anything else left, marked as minor, is superficial if (Namespace_type == 'article' && Sum_value == 1 && Revert=='no' && Notable =='no' && Superfic=='no' && Significant == 'no' && Minor=='yes') {         Minor_nonrv = 1; Minor = 'yes'; Superfic = 'yes'; } //anything else left, not marked as minor, is significant else if (Namespace_type == 'article' && Sum_value == 1 && Revert=='no' && Notable =='no' && Superfic=='no' && Significant == 'no' && Minor=='no') {         Minor_nonrv = 1; Significant = 'yes' Minor = 'yes'; } //flagging if (Sum_value == -1 && Marked_as_minor == 'yes') {         ArtSf = ArtSf + 1; l[i].innerHTML += ' (' + sflink + ') #' + ArtSf; }         else if (Notable == 'yes' && Marked_as_minor == 'no') {         ArtSig = ArtSig + 1; l[i].innerHTML += ' (' + alink + ') #' + ArtSig; }         else if (Notable == 'yes' && Marked_as_minor == 'yes') {         ArtSig = ArtSig + 1; l[i].innerHTML += ' (' + malink + ') #' + ArtSig; }         else if (Superfic == 'yes' && Minor == 'yes' && Sum_value == 1) {         ArtSf = ArtSf + 1; l[i].innerHTML += ' (' + sflink + ') #' + ArtSf; }         else if (Superfic == 'no' && Minor == 'yes' && Significant == 'yes' && Sum_value == 1 && Revert == 'no') {         ArtM = ArtM + 1; l[i].innerHTML += ' (' + minalink + ') #' + ArtM; } } //end article stats //user flagging if (l[i].innerHTML.indexOf('(cur) (') == -1 && l[i].innerHTML.indexOf(') (last)') == -1) {        if (l[i].getElementsByTagName('a')[3-del_offset].href.indexOf('Special:Contributions') !=-1) {               IP = IP + 1; l[i].innerHTML += ' (' + iplink + ') #' + IP; Newbie = 1; IP_user = 1; Newbie_edits += 1; }        else if (l[i].getElementsByTagName('a')[3-del_offset].href.indexOf('&action=edit') !=-1 && l[i].getElementsByTagName('a')[4-del_offset].href.indexOf('&action=edit') !=-1 && sysop == 'no') {               VN = VN + 1; l[i].innerHTML += ' (' + nutlink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }        else if (l[i].getElementsByTagName('a')[3-del_offset].href.indexOf('&action=edit') !=-1 && sysop == 'no') {               NU = NU + 1; l[i].innerHTML += ' (' + nulink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }        else if (l[i].getElementsByTagName('a')[4-del_offset].href.indexOf('&action=edit') !=-1 && sysop == 'no') {               NU = NU + 1; l[i].innerHTML += ' (' + ntlink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }        }        else if (l[i].innerHTML.indexOf('(cur) (') !=-1 && l[i].innerHTML.indexOf(') (last)') !=-1) {         if (l[i].getElementsByTagName('a')[1].href.indexOf('Special:Contributions') !=-1) {             IP = IP + 1; l[i].innerHTML += ' (' + iplink + ') #' + IP; Newbie = 1; IP_user = 1; Newbie_edits += 1; }         else if (l[i].getElementsByTagName('a')[1].href.indexOf('&action=edit') !=-1 && l[i].getElementsByTagName('a')[2].href.indexOf('&action=edit') !=-1 && sysop == 'no') {             VN = VN + 1; l[i].innerHTML += ' (' + nulink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }         else if (l[i].getElementsByTagName('a')[1].href.indexOf('&action=edit') !=-1 && sysop == 'no') {             NU = NU + 1; l[i].innerHTML += ' (' + nulink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }         }        else if (l[i].innerHTML.indexOf('(cur) (') !=-1 || l[i].innerHTML.indexOf(') (last)') !=-1) {         if (l[i].getElementsByTagName('a')[2].href.indexOf('Special:Contributions') !=-1) {           IP = IP + 1; l[i].innerHTML += ' (' + iplink + ') #' + IP; Newbie = 1; IP_user = 1; IP_edits += 1; Newbie_edits += 1; }         if (l[i].getElementsByTagName('a')[2].href.indexOf('&action=edit') !=-1 && l[i].getElementsByTagName('a')[3].href.indexOf('&action=edit') !=-1 && sysop == 'no') {           VN = VN + 1; l[i].innerHTML += ' (' + nulink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }         else if (l[i].getElementsByTagName('a')[2].href.indexOf('&action=edit') !=-1 && sysop == 'no') {           NU = NU + 1; l[i].innerHTML += ' (' + nulink + ') #' + NU; Newbie = 1; Newbie_edits += 1; }        }     if (Newbie == 1 && l[i].innerHTML.indexOf(revlink) == -1 && Revert == 'no') {Newbie_nonreverts += 1;} if (IP_user == 1 && l[i].innerHTML.indexOf(revlink) == -1 && Revert == 'no') {IP_nonreverts += 1;} } //end of FOR LOOP if (i == 1) { document.getElementById('contentSub').innerHTML = ' There are no page modification statistics to show since there is only one edit. '; return; } if (document.title.indexOf('View and restore deleted pages') !=-1) {  var first_time = l[0].getElementsByTagName('a')[0].innerHTML; var last_time = l[i-1].getElementsByTagName('a')[0].innerHTML; } else { if (location.href.indexOf('&offset=') !=-1 && location.href.indexOf('&offset=0') == -1) var first_time = l[0].getElementsByTagName('a')[2].innerHTML; else if (l[0].innerHTML.indexOf('(cur) ') !=-1) var first_time = l[0].getElementsByTagName('a')[1].innerHTML; else if (l[0].innerHTML.indexOf(' (last)') !=-1) var first_time = l[0].getElementsByTagName('a')[1].innerHTML; if (l[i-1].innerHTML.indexOf(' (last)') !=-1) var last_time = l[i-1].getElementsByTagName('a')[1].innerHTML; else var last_time = l[i-1].getElementsByTagName('a')[2].innerHTML; } var E = i; var SE = E-Reverted-R; var RU = E-IP; var OU = E-IP-NU-VN-SYS-BOT; var UN = IP+NU; var ESUM = 100*(E-NS)/E; totdays = getDateDiff(current_time,last_time); framedays = getDateDiff(first_time,last_time); var caverage = E/totdays; var average = E/framedays; var rvaverage = R/framedays; var nonrvave = average - rvaverage; var Daylength = Math.round((1)*framedays)/1; if (framedays < 1) Daylength = 1; var Dayspassed = Math.round((1)*totdays)/1; if (totdays < 1) Dayspassed = 1; var avenotice = ''; //wow..statistics people var caverage = Math.round((1000)*caverage)/1000; if (location.href.split("&offset=")[1] != undefined) { if (location.href.split("&offset=0")[1] != undefined) {var offset = 'no';} else { caverage = ' [Value unknown]* '; avenotice = ' *Average edits per day not shown because the most recent edit to this page is not visible '; var offset = 'yes'; } } var ArticleAves = ' Analysis: '; if (Namespace_type == 'article') { ArticleAves = ' Analysis: ' + ' Notable edits (creation/expansion/major rewrites/sourcing): ' + Math.round((100)*(100*(ArtSig)/E))/100 + ' % (' + ArtSig + ' edit(s)) ' + ' Significant edits (copyedits/small rewrites/content/reference additions): ' + Math.round((100)*(100*(ArtM)/E))/100 + ' % (' + ArtM + ' edit(s)) ' + ' Superficial edits (grammar/spelling/wikify/links/tagging): ' + Math.round((100)*(100*(ArtSf)/E))/100 + ' % (' + ArtSf + ' edit(s)) '; } var oldbody = document.getElementById('bodyContent').innerHTML; // document.getElementById('contentSub').innerHTML += ' Viewing page modification statistics (from the ' + E + ' edits shown on this page): '; // document.getElementById('bodyContent').innerHTML = ' ' + document.getElementById('contentSub').innerHTML + ' ' + ' User statistics for these edits: ' + 'Number of users: ' + Users + ' ' + Math.round((100)*IP/E*100)/100 + '% IP/anon edits (' + IP + ' edit(s)) ' + Math.round((100)*VN/E*100)/100 + '% likely new user edits (' + VN + ' edit(s)) '  + Math.round((100)*NU/E*100)/100 + '% likely unestablished user edits (' + NU + ' edit(s)) ' + Math.round((100)*(OU)/E*100)/100 + '% likely older user edits (non-admin/bot) (' + (OU) + ' edit(s)) ' + Math.round((100)*SYS/E*100)/100 + '% administrator edits (' + SYS + ' edit(s)) ' + Math.round((100)*BOT/E*100)/100 + '% bot edits (' + BOT + ' edit(s)) ' + ' Time range:  ' + Daylength + ' approximate day(s) of edits || ' + Dayspassed + ' approximate day(s) since first edit ' + 'Most recent edit on: ' + first_time + ' ' + 'Oldest edit on: ' + last_time + ' ' + 'Current time: ' + current_time + ' ' + ArticleAves + ' ' + Math.round((100)*R/E*100)/100 + '% marked reverts (any) (' + R + ') ' + ' '+ Math.round((100)*V/E*100)/100 + '% probable reverts of vandalism (' + V + ') ' + ' Unmarked edits: ' + Math.round((100)*(100*(UM)/E))/100 + ' % (' + UM + ' edit(s)) ' + ' Averages:  ' + Math.round((100)*ESUM)/100 + '% edit summary usage ' + 'Average edits/user: ' + Math.round((100)*E/Users)/100 + ' ' + caverage + ' edit(s) per day (current) ' + Math.round((1000)*average)/1000 + ' edit(s) per day (since last active) ' + Math.round((1000)*rvaverage)/1000 + ' marked revert(s) per day (since last active)  ' + ' 1 : ' + Math.round((100)*R/(E-R))/100 + ' regular edit to marked revert ratio (RE:RV)  ' + Math.round((100)*100*SE/E)/100 + '% edit progess (non-reverts/reverted edits) (' + SE + ' edit(s)) ' + Math.round((100)*100*Newbie_nonreverts/Newbie_edits)/100 + '% of edits by IPs/new/unestablished users are non-reverts/reverted (' + Newbie_nonreverts + ' out of ' + Newbie_edits + ' edit(s)) ' + Math.round((100)*100*IP_nonreverts/IP)/100 + '% of edits by IP-only users are non-reverts/reverted (' + IP_nonreverts + ' out of ' + IP + ' edit(s)) ' + avenotice + oldbody.split(oldbody.split(' ')[0] + ' ')[1]; //from wikibits.js histrowinit; //popups var body = document.getElementById('bodyContent'); body.ranSetupTooltipsAlready=false; setupTooltips(body); } //END

//From User:JesseW/monobook.js

$(addSinceTab) function addSinceTab {   var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; if (window.location.href.indexOf("&limit=100&action=history&gotosince=true")!=-1) {      do_since_I_last_edited }   else if (location.href.search(/&action=[^p]|Special:|=Special%3A/) ==-1) {      var thetitle=document.title.slice(0, String(document.title).indexOf(" - ")); thetitle = thetitle.replace('&','%26').replace('&','%26').replace('&','%26').replace('&','%26'); var l=addlilink(tabs, "/w/index.php?title="+thetitle+"&limit=100&action=history&gotosince=true", 'since', ''); l.lastChild.title="Changes since I last edited"; } } //END

function do_since_I_last_edited {	var csub=document.getElementById("contentSub"); var msg=document.createElement("p"); msg.appendChild(document.createTextNode			("Parsing history... please wait...")); msg.className="error"; csub.insertBefore(msg, csub.firstChild) var go = 'no'; var username = document.getElementById('pt-userpage').getElementsByTagName('a')[0].innerHTML; var hists = document.getElementById('bodyContent').getElementsByTagName('li'); var findcheck = document.getElementById('bodyContent'); if (hists[0].getElementsByTagName('a')[2].innerHTML == username) {msg.replaceChild(document.createTextNode("You were the last person to edit this page!"),msg.firstChild);; return;} for (var n=0; n<hists.length; n++) {	 if (hists[n].getElementsByTagName('a')[3]) {	    if (hists[n].getElementsByTagName('a')[3].innerHTML == username) {            hists[n].getElementsByTagName('input')[0].checked=true; if (n == 0){msg.replaceChild(document.createTextNode			 ("You were the last person to edit this page!"),			 msg.firstChild); return;} location.href = hists[n].getElementsByTagName('a')[0].href; return; }           }	  else if (hists[n].getElementsByTagName('a')[2]) {	    if (hists[n].getElementsByTagName('a')[2].innerHTML == username) {            if (n == 0){msg.replaceChild(document.createTextNode			 ("You were the last person to edit this page!"),			 msg.firstChild);} return; }           }          }	msg.replaceChild(document.createTextNode			 ("You have not recently edited this page!"),			 msg.firstChild); } //END //