Jump to content

User:Casper2k3/monobook1.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.
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 addTab(url, name, id, title, key){
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    return addlilink(tabs, url, name, id, title, key);
}


var d=new Date()
var month=new Array(12)
month[0]="January"
month[1]="February"
month[2]="March"
month[3]="April"
month[4]="May"
month[5]="June"
month[6]="July"
month[7]="August"
month[8]="September"
month[9]="October"
month[10]="November"
month[11]="December"
month=month[d.getMonth()];
year=d.getFullYear();

$(function() {
document.getElementById('siteSub').innerHTML = 'From Wikipedia, the free encyclopedia<br><div id="jsMessageBox"></div>';
if (document.title.indexOf("User:") != -1)  {

// Testing stuff goes here
}

  if (document.title.indexOf("User:") != 0 &&document.title.indexOf("User talk") != 0 && document.title.indexOf("Editing ") != 0 && document.URL.search(/\?/) == -1 && document.title.indexOf("Image:") != 0 )  {
document.getElementById('jsMessageBox').innerHTML = '[<a href="javascript:speedyButton()"><font color="#0000FF">Speedy Delete</font></a>] - [<a href="javascript:artNoticeButton()"><font color="#0000FF">Article Notice</font></a>] - [<a href="javascript:prodButton()"><font color="#0000FF">Prod</font></a>]<br><div id="jsArticleMessageBox"></div><div id="jsWaitMessageBox"></div>';
  }

if (document.title.indexOf("Image:") != -1)  {
//Images
}

  if (document.title.indexOf("Editing User talk:") != -1 || document.title.indexOf("User talk:") != -1) {
document.getElementById('jsMessageBox').innerHTML = '[<a href="javascript:userWarnButton()"><font color="#0000FF">Warn User</font></a>] - [<a href="javascript:userInfoButton()"><font color="#0000FF">User Information</font></a>] - [<a href="javascript:userWelcomeButton()"><font color="#0000FF">Welcome</font></a>] - [<a href="javascript:prodButton()"><font color="#0000FF">Prod</font></a>]<br><div id="jsArticleMessageBox"></div><div id="jsWaitMessageBox"></div>';
  }
});



mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/speedybutton.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/artnoticebutton.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/userwarnbutton.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/userinfobutton.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/userwelcomebutton.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/reverttools.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/aivreport.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/dateandtime.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/watchlistsince.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/comparelink.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/status.js' 
             + '&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Casper2k3/Javascript/prod.js' 
             + '&action=raw&ctype=text/javascript');