User:Abdullah5599@legacy41961806/monobook.js

// // addScript // adds a 'user scripts' link to the personal links, which links to the user's personal monobook.js page // importScript('User:Matt/ModifySidebar.js'); function CustomizeModificationsOfSidebar { ModifySidebar("add", "personal", "my scripts", "/User:" + encodeURIComponent(wgUserName) + "/monobook.js", "My personal user scripts"); ModifySidebar("add", "toolbox", "---", "", "Seperation"); ModifySidebar("add", "toolbox", "My Sandbox", "/User:" + encodeURIComponent(wgUserName) + "/Sandbox", ""); ModifySidebar("add", "toolbox", "New pages", "/Special:Newestpages", ""); ModifySidebar("add", "toolbox", "Gallery of new files", "/Special:NewImages", ""); ModifySidebar("add", "toolbox", "File List", "/Special:ListFiles", ""); ModifySidebar("add", "toolbox", "---", "/", "Seperation"); ModifySidebar("add", "toolbox", "Articles with Image(s) Requested", "/Category:Articles_with_image(s)_requested", ""); ModifySidebar("add", "toolbox", "Unused Files", "/Special:UnusedImages", ""); ModifySidebar("add", "toolbox", "Short Pages", "/Special:ShortPages", ""); ModifySidebar("add", "toolbox", "Pages needing attention", "/Category:Articles_needing_attention", ""); ModifySidebar("add", "toolbox", "Wanted Pages", "/Special:WantedPages", ""); ModifySidebar("add", "toolbox", "Broken Redirects", "/Special:BrokenRedirects", ""); ModifySidebar("add", "toolbox", "Double Redirects", "/Special:DoubleRedirects", ""); ModifySidebar("add", "toolbox", "---", "/", "Seperation"); ModifySidebar("add", "toolbox", "Uncategorized Pages", "/Special:UncategorizedPages", ""); ModifySidebar("add", "toolbox", "Uncategorized Files", "/Special:UncategorizedFiles", ""); ModifySidebar("add", "toolbox", "Uncategorized Templates", "/Special:UncategorizedTemplates", ""); ModifySidebar("add", "toolbox", "Uncategorized Categories", "/Special:UncategorizedCategories", ""); } addOnloadHook(CustomizeModificationsOfSidebar);

//

// // redirects // adds a tab to the top of pages, when clicked it highlights all links on the page that are redirects. // if (wgAction != 'edit' && wgCanonicalNamespace != 'Special' && wgAction != 'history' && wgAction != 'delete' && wgAction != 'watch' && wgAction != 'unwatch' && wgAction != 'protect' && wgAction != 'markpatrolled' && wgAction != 'rollback' && document.URL.indexOf('diff=') <= 0) { 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'); highlightRedirects.addStylesheetRule('a.mw-redirect:visited', 'color:darkgreen'); }, install : function { with(highlightRedirects) {  addPortletLink ('p-cactions', 'javascript:highlightRedirects.run;', 'redirects', 'ca-redirects', 'Highlights all links which are redirects', 'r') || addPortletLink ('views', 'javascript:highlightRedirects.run;', 'redirects', 'ca-redirects', 'Highlights all links which are redirects', 'r'); } } }; addOnloadHook(highlightRedirects.install); } //

// // last diff // Adds a tab which gives the latest diff for a page. // function lastdiff { addPortletLink("p-cactions", wgServer + "/index.php?title=" + encodeURIComponent(wgPageName) + "&diff=cur&oldid=prev",         "last", "ca-last", "Show most recent diff", '2'); } if (wgCanonicalNamespace != 'Special' && wgAction != 'edit' && wgAction != 'delete' && wgAction != 'watch' && wgAction != 'unwatch' && wgAction != 'protect'){ addOnloadHook(lastdiff); } //