Revision as of 20:15, 5 December 2013 view sourceAnimum (talk | contribs)30,489 edits I'm old at this.← Previous edit |
Latest revision as of 19:26, 28 November 2021 view source Ladsgroup (talk | contribs)Extended confirmed users, IP block exemptions, Pending changes reviewers, Rollbackers20,548 editsm Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink) |
(2 intermediate revisions by 2 users not shown) |
Line 13: |
Line 13: |
|
|
|
|
|
function editcount() { |
|
function editcount() { |
|
var subpagename = wgTitle.split('/'); |
|
var subpagename = mw.config.get('wgTitle').split('/'); |
|
if((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && !subpagename) { |
|
if((mw.config.get('wgNamespaceNumber') == 2 || mw.config.get('wgNamespaceNumber') == 3) && !subpagename) { |
|
var countuser = wgTitle; |
|
var countuser = mw.config.get('wgTitle'); |
|
retrieveData(countuser); |
|
retrieveData(countuser); |
|
} |
|
} |
|
if(wgNamespaceNumber == '-1' && wgTitle == 'Contributions') { |
|
if(mw.config.get('wgNamespaceNumber') == '-1' && mw.config.get('wgTitle') == 'Contributions') { |
|
if(!document.getElementById('contentSub')) return; |
|
if(!document.getElementById('contentSub')) return; |
|
countuser = document.title.split("for ").split(" - "); |
|
countuser = document.title.split("for ").split(" - "); |
Line 26: |
Line 26: |
|
|
|
|
|
function addcountedit() { |
|
function addcountedit() { |
|
var subpagename = wgTitle.split( '/' ); |
|
var subpagename = mw.config.get('wgTitle').split( '/' ); |
|
if(((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && typeof(subpagename) == "undefined") || wgCanonicalSpecialPageName == "Contributions") { |
|
if(((mw.config.get('wgNamespaceNumber') == 2 || mw.config.get('wgNamespaceNumber') == 3) && typeof(subpagename) == "undefined") || mw.config.get('wgCanonicalSpecialPageName') == "Contributions") { |
|
addPortletLink("p-cactions", "javascript:editcount()", String.fromCharCode(47), "ca-editcount"); |
|
mw.util.addPortletLink("p-cactions", "javascript:editcount()", String.fromCharCode(47), "ca-editcount"); |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
|
addOnloadHook(addcountedit); |
|
$(addcountedit); |
|
|
|
|
|
//</nowiki></pre> |
|
//</nowiki></pre> |