Jump to content

User:Vipz/common.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Vipz (talk | contribs) at 03:24, 18 February 2025. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// importScript('User:Ucucha/HarvErrors.js');
importScript('User:Evad37/rater.js'); // [[User:Evad37/rater]]
importScript('User:SD0001/StubSorter.js'); // [[User:SD0001/StubSorter.js]]


// Makes all links to redirects into green
// [[:en:User:Dschwen/highlightredirects.js]]

// Don't load on edit or special pages & don't load twice
if (mw.config.get('wgAction') !== 'edit' && mw.config.get('wgCanonicalNamespace') !== 'Special')
{
var highlightRedirects = {
 
 tab_redirects : null,

 run : function()
 {
  mw.util.addCSS('a.mw-redirect { color:green} a.mw-redirect:visited { color:darkgreen}');
 },

 install : function()
 {
  with(highlightRedirects)
  {
   mw.util.addPortletLink('p-cactions', 'javascript:highlightRedirects.run();', 'redirects') ||
   mw.util.addPortletLink('views', 'javascript:highlightRedirects.run();', 'redirects');
  }
 }

};

//
// Hook up installation function
//
$(highlightRedirects.install);
}