< User:Animum
Browse history interactively ← Previous edit Next edit → Content deleted Content addedInline
Revision as of 03:08, 10 February 2008 view source Animum (talk | contribs )30,489 editsm trying this as per Gracenotes 's suggestion← Previous edit
Revision as of 17:07, 10 February 2008 view source Animum (talk | contribs )30,489 editsm index?Next edit →
Line 25:
Line 25:
req.onreadystatechange = function() {
req.onreadystatechange = function() {
if (req.readyState == 4 && req.status == 200) {
if (req.readyState == 4 && req.status == 200) {
var user = req.responseXML.getElementsByTagName('user');
var user = req.responseXML.getElementsByTagName('user') ;
var count = user.getAttribute('editcount');
var count = user.getAttribute('editcount');
if(user.getAttribute('missing') == undefined) /* The user exists, no? */ alert(user.getAttribute('name') + " has " + count + " surviving edit" + (count == 1 ? "." : "s."));
if(user.getAttribute('missing') == undefined) /* The user exists, no? */ alert(user.getAttribute('name') + " has " + count + " surviving edit" + (count == 1 ? "." : "s."));
Revision as of 17:07, 10 February 2008
//<pre><nowiki>
importScript('User:Voice of All/Addtabs/monobook.js');
addOnloadHook(function() {
var subpagename = wgTitle.split( '/' );
if( (wgNamespaceNumber == 2 || wgNamespaceNumber == 3 || ( wgNamespaceNumber == -1 && wgTitle == 'Contributions' )) && !subpagename ) {
if( wgNamespaceNumber == -1 && wgTitle == 'Contributions') {
if(!document.getElementById( 'contentSub' )) return;
addToolboxLink('javascript:docountedit()', "Edit count", '', '', '');
}
}
});
function docountedit() {
var subpagename = wgTitle.split( '/' );
if( (wgNamespaceNumber == 2 || wgNamespaceNumber == 3 || ( wgNamespaceNumber == -1 && wgTitle == 'Contributions' )) && !subpagename ) {
var countuser = wgTitle.split( '/' );
if( wgNamespaceNumber == -1 && wgTitle == 'Contributions') {
if(!document.getElementById( 'contentSub' )) return;
countuser = document.getElementById( 'contentSub' ).getElementsByTagName( 'a' ).getAttribute('title').split(':');
}
var req = new XMLHttpRequest();
req.open("GET", "http://en.wikipedia.org/w/api.php?action=query&list=users&usprop=editcount&ususers=" + encodeURIComponent(countuser) + "&format=xml", true);
req.onreadystatechange = function() {
if (req.readyState == 4 && req.status == 200) {
var user = req.responseXML.getElementsByTagName('user');
var count = user.getAttribute('editcount');
if(user.getAttribute('missing') == undefined) /* The user exists, no? */ alert(user.getAttribute('name') + " has " + count + " surviving edit" + (count == 1 ? "." : "s."));
}
}
req.send();
}
}
//</nowiki></pre>
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.
**DISCLAIMER** We are not affiliated with Wikipedia, and Cloudflare.
The information presented on this site is for general informational purposes only and does not constitute medical advice.
You should always have a personal consultation with a healthcare professional before making changes to your diet, medication, or exercise routine.
AI helps with the correspondence in our chat.
We participate in an affiliate program. If you buy something through a link, we may earn a commission 💕
↑