User:Yksin/monobook.js

From Wikipedia, the free encyclopedia

If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
//-------------------Twinkle--------------------------------
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklefluff.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('User:AzaToth/twinklewarn.js');
importScript('User:AzaToth/twinklearv.js');
importScript('User:AzaToth/twinklespeedy.js');
importScript('User:AzaToth/twinklediff.js');
importScript('User:AzaToth/twinkleprotect.js');
 
addOnloadHook(function () {
    if (!wgCanonicalSpecialPageName || wgCanonicalSpecialPageName != "Watchlist") return;
    if (!document.forms[0] || !document.forms[0].namespace) return;
 
    var link = document.createElement('a');
    link.id = 'listSince';
    link.href = '#listSince';  // must have a href to show as link!
 
    var then = +(new Date());
    var fixLinkHref = function () {
        var url = window.location.href.split('#')[0];
        var days = ( +(new Date()) - then )/(1000 * 3600 * 24);
        if (url.match(/[?&]days=/))
            this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days);
        else
            this.href = url + (url.indexOf('?') < 0 ? '?':'&') + 'days=' + days;
        return true;
    };
    link.onclick = fixLinkHref;
    link.onmousedown = fixLinkHref;  // react to middle clicks too
 
    var frag = document.createDocumentFragment();
    frag.appendChild(document.createTextNode(' | '));
    frag.appendChild(link);
    link.appendChild(document.createTextNode('Changes'));
    frag.appendChild(document.createTextNode(' since last load.'));
 
    // just one little ID attribute would be _so_ nice...
    var nsSelectForm = document.getElementsByTagName('form')[0];
    nsSelectForm.parentNode.insertBefore(frag, nsSelectForm);
});
 
//------ TwinkleConfig-----
 
 
TwinkleConfig = {
revertMaxRevisions              :       50,
userTalkPageMode                :       'blank',
showSharedIPNotice              :       true,
openTalkPage                    :       [ 'agf', 'norm', 'vand' ],
openTalkPageOnAutoRevert        :       false,
openAOLAnonTalkPage             :       false,
summaryAd                       :       " using [[WP:TWINKLE|TW]]",
deletionSummaryAd               :       " using [[WP:TWINKLE|TW]]",
protectionSummaryAd             :       " using [[WP:TWINKLE|TW]]",
watchSpeedyPages                :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ],
watchProdPages                  :       true,
openUserTalkPageOnSpeedyDelete  :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
watchRevertedPages              :       [ ],
markRevertedPagesAsMinor        :       [ 'vand' ],
deleteTalkPageOnDelete          :       false,
watchWarnings                   :       false,
markAIVReportAsMinor            :       false,
markSpeedyPagesAsMinor          :       true,
markProdPagesAsMinor            :       false,
confirmUsernameToAIV            :       true,
toolboxButtons                  :       [ ]
};
 
//-------------------wikED--------------------------------
 
// 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>');
 
// Script from [[User:Dr pda/persondata.js]]
importScript('User:Dr pda/persondata.js'); //[[User:Dr pda/persondata.js]]
 
//----------------Commons Helper--------------------------
 
// [[User:Krimpet/CH2.js]]
importScript('User:Krimpet/CH2.js');
 
//-------------- Tools:Navigation Popupups ---------------
// [[User:Lupin/popups.js]]
 
importScript('User:Lupin/popups.js');