Jump to content

User:Skitzouk/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Skitzouk (talk | contribs) at 23:30, 15 December 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
////////////////////////////////////////////////////////////////
// =-=-=- HELPER FUNCTIONS -=-=-=-
function addlilink(tabs, url, name, id, title, key){
    var na = document.createElement('a');
    na.href = url;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    if(id) li.id = id;
    li.appendChild(na);
    tabs.appendChild(li);
    if(id)
    {
        if(key && title)
        {
            ta[id] = [key, title];
        }
        else if(key)
        {
            ta[id] = [key, ''];
        }
        else if(title)
        {
            ta[id] = ['', title];
        }
    }
    // re-render the title and accesskeys from existing code in wikibits.js
    akeytt();
    return li;
}
 
function addToolboxLink(url, name, id){
    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
    addlilink(tb, url, name, id);
}
 
function addTab(url, name, id, title, key) {
    return addPortletLink('p-cactions', url, name, id, title, key);
}
 
function addLink(where, url, name, id, title, key, after){
    var na = document.createElement('a');
    na.href = url;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    if(id) li.id = id;
    li.appendChild(na);
    var tabs = document.getElementById(where).getElementsByTagName('ul')[0];
    if(after) {
	tabs.insertBefore(li,document.getElementById(after));
    } else {
	tabs.appendChild(li);
    }
    if(id) {
	if(key && title) { ta[id] = [key, title]; }
	else if(key) { ta[id] = [key, '']; }
	else if(title) { ta[id] = ['', title];} 
    }
    // re-render the title and accesskeys from existing code in wikibits.js
    akeytt();
    return li;
}
 
function addlimenu(tabs, name, id)
{
    var na = document.createElement('a');
    na.href = '#';
    var mn = document.createElement('ul');
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.id = id;
    li.className = 'tabmenu';
    li.appendChild(na);
    li.appendChild(mn);
    tabs.appendChild(li);
    return li;
}
/////////////////////////////////////////////

<nowiki> Helper tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
</nowiki>

<nowiki> Admin-like RC Patrol tools

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice of All/nolupin/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
</nowiki>
 [[User:Lupin/popups.js]] - navigation popups
importScript('User:Lupin/popups.js');
 
 [[User:Jsimlo/shortcuts.js]] - customized sidebar links
importScript('User:Jsimlo/shortcuts.js');
 
function shortcutsInit ()
{
 
shortcutsAddLink ( 'Sandbox', 'Wikipedia:Sandbox' );
shortcutsAddLink ( 'Intro', 'Wikipedia:Introduction' );
shortcutsAddLink ( 'The Village Pump', 'WP:PUMP' );
 
}
 
 Purge tab
importScript('Wikipedia:WikiProject User scripts/Scripts/Add purge to tabs');
 
 User watchlist from [[User:Tra/userwatchlist.js]]
importScript('User:Tra/userwatchlist.js');
 
 Logs link in toolbox
importScript('Wikipedia:WikiProject User scripts/Scripts/Logs link');
 

// Performs basic formatting changes from a tab while editing
importScript('Wikipedia:WikiProject User scripts/Scripts/Formatter');
 
// Quick previewing button in editing toolbar
importScript('User:Alex Smotrov/qpreview.js');
 
*/
var detect = navigator.userAgent.toLowerCase();
var IE;
var place = detect.indexOf('msie') + 1;
if (place) IE=true;
if (!IE) {
 
importScript('User:AzaToth/twinkle.js');
 
TwinkleConfig = {
 
revertMaxRevisions : 50,
userTalkPageMode : 'tab',
showSharedIPNotice : true,
openTalkPage : [ 'agf', 'norm', 'vand' ],
openTalkPageOnAutoRevert : false,
openAOLAnonTalkPage : false,
summaryAd : " ([[WP:TWINKLE|TW]])",
deletionSummaryAd : " ([[WP:TWINKLE|TW]])",
protectionSummaryAd : " ([[WP:TWINKLE|TW]])",
watchSpeedyPages : [ ],
watchProdPages : true,
openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
watchRevertedPages : [ ],
markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ],
deleteTalkPageOnDelete : false,
watchWarnings : false,
markAIVReportAsMinor : false,
markSpeedyPagesAsMinor : false,
offerReasonOnNormalRevert : true
};
 
// [[User:Voice of All]]'s helper JavaScript
importScript('User:Voice of All/Addtabs/monobook.js');
 
// UTC time clock with double-click purge function
importScript('User:Voice of All/UTCclock.js');
 
// [[User:Lupin/recent2.js]] anti-vandalism script
importScript('User:Lupin/recent2.js');
 
}
[[Category:Wikipedians who use RC script]]