User:Casper2k3/monobook1.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Casper2k3/monobook1. |
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');