MediaWiki:Common.js: Difference between revisions

From WikiBound, your community-driven EarthBound/Mother wiki
Jump to navigationJump to search
no edit summary
No edit summary
No edit summary
Line 229: Line 229:
         return;  // don't display link for special pages
         return;  // don't display link for special pages


     url = wgServer + "/starfox/w/index.php?title=Special:Log&page=" + encodeURIComponent(wgPageName);
     url = wgServer + "/MotherEarthBoundWiki/index.php?title=Special:Log&page=" + encodeURIComponent(wgPageName);


     addPortletLink("p-tb", url, "Page logs", "pt-logs");
     addPortletLink("p-tb", url, "Page logs", "pt-logs");
Line 246: Line 246:
     var title = wgTitle;
     var title = wgTitle;
   
   
     addPortletLink('p-tb', '/starfox/w/index.php?title=Special:Userrights/'+title,
     addPortletLink('p-tb', '/MotherEarthBoundWiki/index.php?title=Special:Userrights/'+title,
                   'User rights', 't-userrights', 'User rights for "'+title+'"');
                   'User rights', 't-userrights', 'User rights for "'+title+'"');
   
   
Line 271: Line 271:
     if(n.nodeType==1&&n.tagName.toLowerCase()=="a") //anchor
     if(n.nodeType==1&&n.tagName.toLowerCase()=="a") //anchor
     {
     {
       if(n.href.indexOf("/starfox/wiki/User:")!=-1)
       if(n.href.indexOf("/MotherEarthBoundWiki/index.php?title=User:")!=-1)
       {
       {
         var u=n.href.split("/starfox/wiki/User:")[1];
         var u=n.href.split("/MotherEarthBoundWiki/index.php?title=User:")[1];
         if(adminrights[u.split("_").join("%20")]==1)
         if(adminrights[u.split("_").join("%20")]==1)
         {
         {
Line 282: Line 282:
         n=n.nextSibling;
         n=n.nextSibling;
       }
       }
       else if(n.href.indexOf("/starfox/wiki/User:")!=-1)
       else if(n.href.indexOf("/MotherEarthBoundWiki/index.php?title=User:")!=-1)
       {
       {
         var u=n.href.split("/starfox/wiki/User:")[1];
         var u=n.href.split("/MotherEarthBoundWiki/index.php?title=User:")[1];
         if(adminrights[u.split("_").join("%20")]==1)
         if(adminrights[u.split("_").join("%20")]==1)
         {
         {
Line 328: Line 328:
if (document.URL.indexOf('&rcid=') > 0 && wgAction != 'markpatrolled')
if (document.URL.indexOf('&rcid=') > 0 && wgAction != 'markpatrolled')
{
{
  addPortletLink ('p-cactions', "/starfox/w/index.php?title=" + encodeURIComponent(wgPageName) + "&action=markpatrolled&rcid=" + document.location.toString().split('&rcid=')[1].split('&'), 'patrol', 'ca-patrol', 'Mark as patrolled', '1');
  addPortletLink ('p-cactions', "/MotherEarthBoundWiki/index.php?title=" + encodeURIComponent(wgPageName) + "&action=markpatrolled&rcid=" + document.location.toString().split('&rcid=')[1].split('&'), 'patrol', 'ca-patrol', 'Mark as patrolled', '1');
}
}
else if (document.URL.indexOf('&rcid=') > 0 && wgAction == 'markpatrolled')
else if (document.URL.indexOf('&rcid=') > 0 && wgAction == 'markpatrolled')
{
{
  addPortletLink ('p-cactions', "/starfox/w/index.php?title=Special:RecentChanges&hidepatrolled=1", 'return', 'ca-return', 'Return to unpatrolled recent changes', '1');
  addPortletLink ('p-cactions', "/MotherEarthBoundWiki/index.php?title=Special:RecentChanges&hidepatrolled=1", 'return', 'ca-return', 'Return to unpatrolled recent changes', '1');
}
}
}
}

Navigation menu