Difference between revisions of "MediaWiki:Common.js"

There. Fixed.
(There. Fixed.)
Line 626: Line 626:
         return;  // don't display link for special pages
         return;  // don't display link for special pages


     url = wgServer + "/index.php?title=Special:Log&page=" + encodeURIComponent(wgPageName);
     url = wgServer + "/wiki/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 679: Line 679:
         n=n.nextSibling;
         n=n.nextSibling;
       }
       }
       else if(n.href.indexOf("/index.php?title=User:")!=-1)
       else if(n.href.indexOf("/wiki/index.php?title=User:")!=-1)
       {
       {
         var u=n.href.split("/index.php?title=User:")[1];
         var u=n.href.split("/wiki/index.php?title=User:")[1];
         if(adminrights[u.split("_").join("%20")]==1)
         if(adminrights[u.split("_").join("%20")]==1)
         {
         {
Line 725: Line 725:
if (document.URL.indexOf('&rcid=') > 0 && wgAction != 'markpatrolled')
if (document.URL.indexOf('&rcid=') > 0 && wgAction != 'markpatrolled')
{
{
  addPortletLink ('p-cactions', "/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', "/wiki/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', "/index.php?title=Special:RecentChanges&hidepatrolled=1", 'return', 'ca-return', 'Return to unpatrolled recent changes', '1');
  addPortletLink ('p-cactions', "/wiki/index.php?title=Special:RecentChanges&hidepatrolled=1", 'return', 'ca-return', 'Return to unpatrolled recent changes', '1');
}
}
}
}
Line 740: Line 740:
// --------------------------------------------------------
// --------------------------------------------------------
function lastdiff() {
function lastdiff() {
addPortletLink("p-cactions", wgServer +  "/index.php?title=" + encodeURIComponent(wgPageName) + "&diff=cur&oldid=prev",  
addPortletLink("p-cactions", wgServer +  "/wiki/index.php?title=" + encodeURIComponent(wgPageName) + "&diff=cur&oldid=prev",  
         "last", "ca-last", "Show most recent diff", '2');
         "last", "ca-last", "Show most recent diff", '2');
}
}
Line 753: Line 753:
// Colors the page size changes on the recent changes
// Colors the page size changes on the recent changes
// --------------------------------------------------------
// --------------------------------------------------------
importStylesheetURI(wgServer +"/User:Matt/RC_Colors.css" + "&ctype=text/css&action=raw");
importStylesheetURI(wgServer +"/wiki/index.php?title=User:Matt/RC_Colors.css" + "&ctype=text/css&action=raw");
//
//
577

edits