User:Rfc1394/ex-monobook.js

From Wikipedia, the free encyclopedia
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.
// Live Preview customization,
// edit this to your own liking.

wpUserName   = 'Rfc1394';   // User name to display in signatures
wpShowImages = true;      // Enable downloading and displaying of images

// Include Live Preview...
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js&action=raw&ctype=text/javascript');
importScript('User:Anomie/linkclassifier.js'); // Linkback: [[User:Anomie/linkclassifier.js]]
importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: [[User:Anomie/linkclassifier.css]]
// Now set everything up
window.onload = Main;

function Main()
{
 LivePreviewInstall();
 // You may include here other "extensions"
}

/* This is to keep track of who is using the Live Preview: [[User:Pilaf/livepreview.js]] */

// [[User:Lupin/popups.js]]

mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

// install [[User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// Duplicate top tabs at bottom of page 
addOnloadHook(function () {
    var tabs = document.getElementById('p-cactions').cloneNode(true);
    tabs.id = 'mytabs';
    var listitems = tabs.getElementsByTagName('LI');
    for (i=0;i<listitems.length;i++) {
        if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;
    }

    content = document.getElementById("content");    // Find the content div
    content.parentNode.insertBefore(tabs, content.nextSibling);    // Place tab list right after content div
});
// End duplicate

// Allow for links to redirect pages to be green
// [[User:Dschwen/highlightredirects.js]] - please include this line 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/highlightredirects.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
// end redirect colorizer

// Add extra edit buttons
// Script from [[User:MarkS/extraeditbuttons.js]]
importScript('User:MarkS/extraeditbuttons.js'); //[[User:MarkS/extraeditbuttons.js]]
// end add

// from User:Interiot
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript');

// add strikeout button to toolbar
function addStrikeoutButton() {

    editingTools = document.getElementById('toolbar');

    if (editingTools != null)  {

        StrikeTextButton = "  <a href=\"javascript:insertTags('<s>','</s>','Insert text here');\"><img src=\"http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png\" alt=\"Strike\" title=\"Strike-through text\"></a>";
 
        editingTools.innerHTML = editingTools.innerHTML + StrikeTextButton;
    }
}

window.onload = addStrikeoutButton;

// end strikeout