User:Karl Dickman/standard.js

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.

// [[w:User:Lupin/popups.js]] - please include this line 

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



popupDelay=0.2;
popupAdminLinks=true;
popupShortcutKeys=true;
popupDragging=true;
popupFixRedirs=true;
popupFixDabs=true;
popupMaxPreviewSentences=10;
popupMaxPreviewCharacters=1500;

function KateLinkClassicSkin()
{
                //      This is tricky, as there are so few tag-IDs to assist us.
                //      I'm placing Kate right after the "User (Talk)" links at top.
                //
        var td = document.getElementById( 'topbar' ).getElementsByTagName( 'td' )[ 2 ];
        var user = td.getElementsByTagName( 'a' )[ 0 ];
        var name = user.firstChild.nodeValue;
        var loc = td.getElementsByTagName( 'br' )[ 0 ]; // insert before this

        var kate = document.createElement( 'a' );
                kate.appendChild( document.createTextNode( '(Count)' ) );
                kate.href = 'http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=enwiktionary_p&user=' + name;

        td.insertBefore( document.createTextNode( ' ' ), loc );
        td.insertBefore( kate, loc );
}
if ( window.addEventListener ) window.addEventListener( 'load', KateLinkClassicSkin, false );
else if ( window.attachEvent ) window.attachEvent( 'onload', KateLinkClassicSkin );

// Script from [[w:User:MarkS/extraeditbuttons.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

function hidevfd(){
    var divs = document.getElementsByTagName("div");
    for(var x = 0; x < divs.length; ++x)
        if(divs[x].className.indexOf("vfd") != -1)
            divs[x].style.display = "none";
    document.getElementById('footer').style.display = 'none';
}

function showvfd(){
    var divs = document.getElementsByTagName("div");
    for(var x = 0; x < divs.length; ++x)
        if(divs[x].className.indexOf("vfd") != -1)
            divs[x].style.display = "";
    document.getElementById('footer').style.display = '';
}

function addlilink(tabs, url, name){
    var na = document.createElement('a');
    na.href = url;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.appendChild(na);
    tabs.appendChild(li);
    return li;
}

function vfdlinks(){
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    if(document.title.indexOf("Wikipedia:Articles for deletion") == 0){
        addlilink(tabs, 'javascript:hidevfd()', 'Hide');
        addlilink(tabs, 'javascript:showvfd()', 'Show');
    }
}

if (window.addEventListener) window.addEventListener("load",vfdlinks,false);
else if (window.attachEvent) window.attachEvent("onload",vfdlinks);