User:Omtay38/monobook.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. |
The accompanying .css page for this skin is at User:Omtay38/monobook.css. |
//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
document.write('<script type=;text/javascript" src="'
+ 'http://en.wiki.x.io/w/index.php?title=User:Interiot/Tool2/code.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); }
//
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)
};
//
//
$(function () {
var query_prefix = "title=Special:Watchlist&action=submit&remove=1&id[]=";
//var query_prefix = "action=unwatch&title=";
if (window.location.href.indexOf("Special:Watchlist") < 0) return;
if (window.location.href.indexOf("Special:Watchlist/edit") >= 0) return;
var links = document.getElementById('content').getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
if (links[i].href.substring(links[i].href.length-15) != '&action=history')
continue;
var unwatch = document.createElement('a');
unwatch.href = "/w/index.php?" + query_prefix + encodeURIComponent(links[i].title);
unwatch.title = "Unwatch "+links[i].title;
unwatch.appendChild(document.createTextNode("unwatch"));
links[i].parentNode.insertBefore(unwatch, links[i].nextSibling);
// kluge to handle case where "diff" is unlinked:
var delim = links[i].previousSibling;
delim = (delim.nodeType == 3 ? delim.nodeValue : "");
links[i].parentNode.insertBefore(document.createTextNode(delim.replace(/^.*diff/, "")), unwatch);
}
});
//
function inc (file) {
var lt = String.fromCharCode(60);
var gt = String.fromCharCode(62);
if (file.indexOf(".js") > -1) {
document.writeln(lt+'script type="text/javascript" src="/w/index.php?title='+file+'&action=raw&ctype=text/javascript&dontcountme=s"'+gt+lt+'/script'+gt);
} else if (file.indexOf(".css") > -1) {
document.writeln(lt+'link rel="stylesheet" type="text/css" href="/w/index.php?title='+file+'&action=raw&ctype=text/css" /'+gt);
}
}
inc("User:Topaz/init.js");
inc("User:Topaz/util.js");
inc("User:Topaz/comm.js");
inc("User:Topaz/wputil.js");
inc("Special:Mypage/statuschanger.js");
// [[User:Outriggr/metadatatest.js]] <nowiki>
importScript('User:Outriggr/metadatatest.js');
assessmentMyTemplateCode = ["{{Musicals-project|class=}}"];
assessmentDefaultProject = "Musicals-project";
// </nowiki>
// Add date and time to your monobook "personal menu" list at the very top of the page.
// Created by [[User:Mathwiz2020]]
// Indicate where you would like the time to appear:
// 1 is first (before username), 2 is second (before talk link), ... 7 is last (after log out link)
insertBeforeNum = 1;
// Do NOT edit below this line unless you're experiened in javascript
insertBeforeArr = new Array("","pt-userpage","pt-mytalk","pt-preferences","pt-watchlist","pt-mycontris","pt-logout","");
insertBefore = insertBeforeArr[insertBeforeNum];
function makeTime()
{
var li = document.createElement( 'li' );
li.id = 'pt-time';
var mySpan = document.createElement( 'span' );
mySpan.appendChild( document.createTextNode( 'date and time' ) );
li.appendChild( mySpan );
if ( insertBefore )
{
var before = document.getElementById( insertBefore );
before.appendChild( li, before );
}
else // append to end (right) of list
{
document.getElementById( 'pt-logout' ).parentNode.appendChild( li );
}
getTime();
}
if ( window.addEventListener ) window.addEventListener ( 'load', makeTime, false );
else if ( window.attachEvent ) window.attachEvent ( 'onload', makeTime );
function getTime()
{
var time = new Date();
var date = time.getUTCDate();
var months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
month = months[time.getUTCMonth()];
var year = time.getUTCFullYear();
var hours = '0' + time.getUTCHours();
hours = hours.substr(hours.length-2, hours.length);
var minutes = '0' + time.getUTCMinutes();
minutes = minutes.substr(minutes.length-2, minutes.length);
var seconds = '0' + time.getUTCSeconds();
seconds = seconds.substr(seconds.length-2, seconds.length);
var curTime = hours + ":" + minutes + ":" + seconds + ", " + date + " " + month + " " + year + " (UTC)";
datePlace = document.getElementById('pt-time').childNodes[0].childNodes[0];
datePlace.replaceData(0, datePlace.length, curTime);
doTime = window.setTimeout("getTime()", 1000);
}
//
// [[User:Ais523/votesymbols.js]]
// Code for adding icons to !votes in AfDs, RfAs, etc.. Doesn't affect the page, just
// shows the icons when this code is installed.
// Please see [[:Image:Votesymbols.js-enhanced_SfD.png]] for copyright info on the images that are added.
function lowerNoPunct(s)
{
return s.toLowerCase().split('.').join('').split(',').join('').split(':').join('').split(';').join('').split('+').join('');
}
$(function() {
if(wgNamespaceNumber==0) return; //avoid article space, generally speaking
var vs=
"http://up.wiki.x.io/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/15px-Symbol_support_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/d/d0/Symbol_keep_vote.svg/15px-Symbol_keep_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/7/7f/Symbol_oppose_vote.svg/15px-Symbol_oppose_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/8/89/Symbol_delete_vote.svg/15px-Symbol_delete_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/8/89/Symbol_neutral_vote.svg/15px-Symbol_neutral_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/b/b0/Symbol_merge_vote.svg/15px-Symbol_merge_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/5/50/Symbol_move_vote.svg/15px-Symbol_move_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/0/0c/Symbol_redirect_vote.svg/15px-Symbol_redirect_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/b/ba/Symbol_opinion_vote.svg/15px-Symbol_opinion_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/9/9e/Symbol_comment_vote_2.svg/15px-Symbol_comment_vote_2.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/f/f6/Symbol_unsupport_vote.svg/15px-Symbol_unsupport_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/e/e0/Symbol_question.svg/15px-Symbol_question.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/a/aa/Symbol_divide_vote.svg/15px-Symbol_divide_vote.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/5/54/Symbol_wait.svg/15px-Symbol_wait.svg.png#"+
"http://up.wiki.x.io/wikipedia/commons/thumb/b/bc/Face-grin.svg/15px-Face-grin.svg.png";
var vt=vs.split("#");
var la=new Array();
la['support']=0; la['endorse']=0;
la['keep']=1;
la['oppose']=2; la['overturn']=2; la['object']=2;
la['delete']=3;
la['neutral']=4;
la['merge']=5; la['upmerge']=5;
la['move']=6; la['rename']=6; la['userfy']=6; la['transwiki']=6;
la['redirect']=7;
la['opinion']=8; la['relist']=8; la['subst']=8; la['salt']=8; la['change']=8;
// Note that icon 8 on the list is often used for debate-specific !votes
la['comment']=9; la['update']=9; la['note']=9;
la['delist']=10;
la['question']=11;
la['split']=12;
la['wait']=13;
la['bjaodn']=14;
var btc=document.body.getElementsByTagName("B");
i=btc.length;
while(i--)
{
var j,k;
j=btc[i].innerHTML.split("<").join(" ").split(">").join(" ").split("/").join(" ").split(" ");
k=0;
var x="";
while(k<j.length)
{
if(lowerNoPunct(j[k])=="don't"||lowerNoPunct(j[k])=='not'
||lowerNoPunct(j[k])=='no'||lowerNoPunct(j[k])=='without') break;
var l=la[lowerNoPunct(j[k])];
if(l!=undefined)
{
x+="<IMG SRC='"+vt[l]+"' /> "
}
k++;
}
if(x!="") btc[i].innerHTML=x+btc[i].innerHTML;
}
});
//[[Category:Wikipedia scripts]]
//<pre><nowiki>
function aivlist(type) {
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
var ip = prompt("Enter IP address", "");
var reason = prompt("Enter reason for listing", "");
t.value += "*{{" + type + "|" + ip +"}} " + reason + "--~" + "~" + "~" + "~";
f.wpSummary.value = "Listing " + ip;
f.submit();
}
addOnloadHook(
function addaivlink() {
if (document.title.indexOf("Editing Wikipedia:Administrator intervention against vandalism") != -1)
{
mw.util.addPortletLink("p-cactions", "javascript:aivlist('vandal')", "vandal", "ca-vandal", "Report a vandal", "");
mw.util.addPortletLink("p-cactions", "javascript:aivlist('ipvandal')", "ipvandal", "ca-ipvandal", "Report an ipvandal", "");
} }
);
//</nowiki></pre>
// [[User:Jsimlo/shortcuts.js]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wiki.x.io/w/index.php?title=User:Jsimlo/shortcuts.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function shortcutsInit ()
{
shortcutsStartSection ( 'User Page' );
shortcutsAddLink ('Home', 'User:Omtay38');
shortcutsAddLink ('Sandbox', 'User:Omtay38/sandbox');
shortcutsAddLink ('Desktop', 'User:Omtay38/desk');
shortcutsAddLink ('Toolbox', 'User:Omtay38/Tools');
shortcutsAddLink ('Talk', 'User talk:Omtay38');
}
// Adds a drop-down menu to the search box to choose the namespace to search in.
$(function () {
var searchGoButton = document.getElementById('searchGoButton');
if (!searchGoButton) return;
var searchNsHidden = document.createElement('input');
searchNsHidden.id = 'searchNsHidden';
searchNsHidden.type = 'hidden';
searchNsHidden.name = 'ns0';
searchNsHidden.value = '1';
var searchNsMenu = document.createElement('select');
searchNsMenu.id = 'searchNsMenu';
searchNsMenu.name = 'ns';
searchNsMenu.options[searchNsMenu.options.length] = new Option('Main', 0);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Talk', 1);
searchNsMenu.options[searchNsMenu.options.length] = new Option('User', 2);
searchNsMenu.options[searchNsMenu.options.length] = new Option('User talk', 3);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedia', 4);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Wikipedia talk', 5);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Image', 6);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Image talk', 7);
searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki', 8);
searchNsMenu.options[searchNsMenu.options.length] = new Option('MediaWiki talk', 9);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Template', 10);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Template talk', 11);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Help', 12);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Help talk', 13);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Category', 14);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Category talk', 15);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Portal', 100);
searchNsMenu.options[searchNsMenu.options.length] = new Option('Portal talk', 101);
searchNsMenu.onchange = function () {
searchNsHidden.name = 'ns' + (this.selectedIndex < 0 ? '0' :
this.options[this.selectedIndex].value);
};
// From /skins-1.5/monobook/main.css?5:
searchNsMenu.style.width = '10.9em';
searchNsMenu.style.margin = '0';
searchNsMenu.style.fontSize = '95%';
searchGoButton.parentNode.insertBefore(searchNsHidden, searchGoButton);
searchGoButton.parentNode.insertBefore(searchNsMenu, searchGoButton);
});
//<pre><nowiki>
function aivlist(type) {
var f = document.editform, t = f.wpTextbox1;
if (t.value.length > 0)
t.value += '\n';
var ip = prompt("Enter IP address", "");
var reason = prompt("Enter reason for listing", "");
t.value += "*{{" + type + "|" + ip +"}} " + reason + "--~" + "~" + "~" + "~";
f.wpSummary.value = "Listing " + ip;
f.submit();
}
addOnloadHook(
function addaivlink() {
if (document.title.indexOf("Editing Wikipedia:Administrator intervention against vandalism") != -1)
{
mw.util.addPortletLink("p-cactions", "javascript:aivlist('vandal')", "vandal", "ca-vandal", "Report a vandal", "");
mw.util.addPortletLink("p-cactions", "javascript:aivlist('ipvandal')", "ipvandal", "ca-ipvandal", "Report an ipvandal", "");
} }
);
//</nowiki></pre>
importScript('User:Alex Smotrov/wlunwatch.js');
importScript('User:AzaToth/twinkle.js');
// [[User:Lupin/popups.js]]
importScript('User:Lupin/popups.js');
popupShowDelay=0.2;
popupHideDelay=0;
importScript('User:Ioeth/friendlywelcome.js');
/**** afd helper ****/
document.write('<script type="text/javascript"' +
'src="http://en.wiki.x.io/w/index.php?title=User:Jnothman/afd_helper/' +
'script.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* This is to keep track of who is using this extension: [[User:Jnothman/afd_helper/script.js]] */