User:EivindJ/monobook.js

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Note: You may have to bypass your browser’s cache to see the changes. In addition, after saving a sitewide CSS file such as MediaWiki:Common.css, it will take 5-10 minutes before the changes take effect, even if you clear your cache.

  • Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
  • Konqueror and Chrome: click Reload or press F5;
  • Opera: clear the cache in Tools → Preferences;
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

This JavaScript is executed for EivindJ on every page load, when User:EivindJ is using the Monobook skin.


// Note: The var wgLangPrefs will retain the value even if it is redeclared
var wgLangPrefs;
if (!wgLangPrefs) wgLangPrefs = Array();
wgLangPrefs.push("no");
wgLangPrefs.push("sv");
wgLangPrefs.push("da");
wgLangPrefs.push("en");
wgLangPrefs.push("af");
wgLangPrefs.push("de");
wgLangPrefs.push("es");

var button = {
        "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/1c/Button_smiley_face_smile.png",  //image to be shown on the button (may be a full URL too), 22x22 pixels
        "speedTip": "Plural",    //text shown in a tooltip when hovering the mouse over the button
        "tagOpen": "{{",        //the text to use to mark the beginning of the block
        "tagClose": "}}",      //the text to use to mark the end of the block (if any)
        "sampleText": "subst:new en plural|"   //the sample text to place inside the block
};
mwCustomEditButtons.push(button);

 
function CustomizeModificationsOfSidebar() {
    //adds [[Special:CategoryTree]] to toolbox
    //ModifySidebar("add", "toolbox", "CategoryTree", "http://en.wikipedia.org/wiki/Special:CategoryTree");
    //removes [[Special:Upload]] from toolbox
    //ModifySidebar("remove", "toolbox", "Upload file", "http://en.wikipedia.org/wiki/Special:Upload");
    ModifySidebar("add", "navigation", "Patrolling", "http://en.wiktionary.org/w/index.php?title=Special:RecentChanges&hidepatrolled=1&days=21&hidemyself=1");
}
 
$(CustomizeModificationsOfSidebar);

importScript('User:Lupin/autoedit.js', 'en.wikipedia.org','46637295');
importScript('User:Conrad.Irwin/creation.js');