< User:Animum
Browse history interactively ← Previous edit Next edit → Content deleted Content addedInline
Revision as of 01:19, 19 February 2008 view source Animum (talk | contribs )30,489 editsm hm.← Previous edit
Revision as of 01:21, 19 February 2008 view source Animum (talk | contribs )30,489 editsm ...Next edit →
Line 28:
Line 28:
addOnloadHook(addcountedit);
addOnloadHook(addcountedit);
function docountedit() {
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 (count != null)
alert(user.getAttribute('name') + " has " + count + " surviving edit" + (count == 1 ? "." : "s."));
}
}
req.send();
}
//</nowiki></pre>
//</nowiki></pre>
Revision as of 01:21, 19 February 2008
//<pre><nowiki>
importScript('User:Voice of All/Addtabs/monobook.js');
function addcountedit() {
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(':');
}
docountedit = function() {
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 (count != null)
alert(user.getAttribute('name') + " has " + count + " surviving edit" + (count == 1 ? "." : "s."));
}
}
req.send();
}
addPortletLink("p-tb", 'javascript:docountedit()', "Edit count", '', 't-count');
}
}
addOnloadHook(addcountedit);
//</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 💕
↑