User:Rocket000/monobook.js

//

// Replacer function wpTextboxReplace{ var s = prompt('Search regexp:'); if(s){ var r = prompt('Replace /'+s+'/ with:'); if(!r && r != '') return; var txt = document.editform.wpTextbox1; txt.value = txt.value.replace(new RegExp(s, 'mg'), r); } } addOnloadHook(function{ if(document.forms.editform){    mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxReplace', 'Replace', 'ca-replace', 'Regexp replace for the edit window', 'R', document.getElementById('ca-history')); } });

// Highlight redirects if(wgAction != 'edit' && wgCanonicalNamespace != 'Special'){ var highlightRedirects = { tab_redirects : null, addStylesheetRule : function(tag, style){ var ss = document.styleSheets[0]; if(ss.insertRule){ ss.insertRule(tag + '{' + style + '}', ss.cssRules.length); } else if(ss.addRule){ ss.addRule(tag, style); }   },    run : function{ highlightRedirects.addStylesheetRule('a.mw-redirect', 'color:green'); },   install : function{ with(highlightRedirects) {     tab_redirects = addPortletLink ('p-cactions', 'javascript:highlightRedirects.run;', 'redirects'); if(document.getElementById('ca-history')) document.getElementById('ca-history').parentNode.appendChild(tab_redirects); }   }  }; addOnloadHook(highlightRedirects.install); }

// CommonsHelper Helper importScript('User:Fran Rogers/CH2.js');

// Auto-formatter importScript('Wikipedia:WikiProject User scripts/Scripts/Formatter');

// Disambiguation lookup importScript('User:Splarka/dabfinder.js');

// Assessment scripts importScript('User:Pyrospirit/metadata.js'); importScript('User:Pyrospirit/metadata/assesslinks.js');

// __NOGALLERY__ toggler importScript('User:Splarka/togglegallery.js');

// Subpages link addOnloadHook(function{ mw.util.addPortletLink('p-tb', '/wiki/Special:PrefixIndex/'+wgPageName+'/', 'Subpages', 't-subpages'); });

//