MediaWiki:Monobook.js

From Poopedia

(Difference between revisions)
 
Line 1: Line 1:
-
/* tooltips and access keys */
+
document.write("<style>\\
-
ta = new Object();
+
.portlet, #p-cactions, #p-personal\\
-
ta['pt-userpage'] = new Array('.','My user page');
+
{\\
-
ta['pt-anonuserpage'] = new Array('.','The user page for the ip you\'re editing as');
+
float: left;\\
-
ta['pt-mytalk'] = new Array('n','My talk page');
+
width: auto;\\
-
ta['pt-anontalk'] = new Array('n','Discussion about edits from this ip address');
+
height: auto;\\
-
ta['pt-preferences'] = new Array('','My preferences');
+
overflow: visible;\\
-
ta['pt-watchlist'] = new Array('l','The list of pages you\'re monitoring for changes.');
+
position: relative;\\
-
ta['pt-mycontris'] = new Array('y','List of my contributions');
+
z-index: auto!important;\\
-
ta['pt-login'] = new Array('o','You are encouraged to log in, it is not mandatory however.');
+
left: auto;\\
-
ta['pt-anonlogin'] = new Array('o','You are encouraged to log in, it is not mandatory however.');
+
top: auto;\\
-
ta['pt-logout'] = new Array('o','Log out');
+
text-align: center;\\
-
ta['ca-talk'] = new Array('t','Discussion about the content page');
+
line-height: normal;\\
-
ta['ca-edit'] = new Array('e','You can edit this page. Please use the preview button before saving.');
+
padding: 0 0.5em;\\
-
ta['ca-addsection'] = new Array('+','Add a comment to this discussion.');
+
margin: 0;\\
-
ta['ca-viewsource'] = new Array('e','This page is protected. You can view its source.');
+
font-size: 100%;\\
-
ta['ca-history'] = new Array('h','Past versions of this page.');
+
white-space: nowrap;\\
-
ta['ca-protect'] = new Array('=','Protect this page');
+
border-collapse: separate\\
-
ta['ca-delete'] = new Array('d','Delete this page');
+
}\\
-
ta['ca-undelete'] = new Array('d','Restore the edits done to this page before it was deleted');
+
.portlet h5, #p-cactions h5, #p-personal h5\\
-
ta['ca-move'] = new Array('m','Move this page');
+
{\\
-
ta['ca-watch'] = new Array('w','Add this page to your watchlist');
+
display:inline;\\
-
ta['ca-unwatch'] = new Array('w','Remove this page from your watchlist');
+
white-space: nowrap;\\
-
ta['search'] = new Array('f','Search this wiki');
+
padding: 0;\\
-
ta['p-logo'] = new Array('','Main Page');
+
margin: 0\\
-
ta['n-mainpage'] = new Array('z','Visit the Main Page');
+
}\\
-
ta['n-portal'] = new Array('','About the project, what you can do, where to find things');
+
.portlet .pBody\\
-
ta['n-currentevents'] = new Array('','Find background information on current events');
+
{\\
-
ta['n-recentchanges'] = new Array('r','The list of recent changes in the wiki.');
+
display: none;\\
-
ta['n-randompage'] = new Array('x','Load a random page');
+
}\\
-
ta['n-help'] = new Array('','The place to find out.');
+
.portlet .pBody, #p-cactions .pBody, #p-personal .pBody\\
-
ta['n-sitesupport'] = new Array('','Support us');
+
{\\
-
ta['t-whatlinkshere'] = new Array('j','List of all wiki pages that link here');
+
position: absolute;\\
-
ta['t-recentchangeslinked'] = new Array('k','Recent changes in pages linked from this page');
+
left: 0em;\\
-
ta['feed-rss'] = new Array('','RSS feed for this page');
+
top: 1.1em;\\
-
ta['feed-atom'] = new Array('','Atom feed for this page');
+
text-align: left;\\
-
ta['t-contributions'] = new Array('','View the list of contributions of this user');
+
white-space: nowrap\\
-
ta['t-emailuser'] = new Array('','Send a mail to this user');
+
}\\
-
ta['t-upload'] = new Array('u','Upload images or media files');
+
#column-one\\
-
ta['t-specialpages'] = new Array('q','List of all special pages');
+
{\\
-
ta['ca-nstab-main'] = new Array('c','View the content page');
+
position: absolute;\\
-
ta['ca-nstab-user'] = new Array('c','View the user page');
+
left: 0;\\
-
ta['ca-nstab-media'] = new Array('c','View the media page');
+
top: 0;\\
-
ta['ca-nstab-special'] = new Array('','This is a special page, you can\'t edit the page itself.');
+
padding: 0\\
-
ta['ca-nstab-wp'] = new Array('a','View the project page');
+
}\\
-
ta['ca-nstab-image'] = new Array('c','View the image page');
+
#column-content\\
-
ta['ca-nstab-mediawiki'] = new Array('c','View the system message');
+
{\\
-
ta['ca-nstab-template'] = new Array('c','View the template');
+
float: none;\\
-
ta['ca-nstab-help'] = new Array('c','View the help page');
+
margin: 0\\
-
ta['ca-nstab-category'] = new Array('c','View the category page');
+
}\\
 +
#column-content #content\\
 +
{\\
 +
margin: 1.1em 0 0 0;\\
 +
padding: 0 1em 1.5em 1em;\\
 +
margin-left: 0\\
 +
}\\
 +
#p-cactions li, #p-personal li\\
 +
{\\
 +
display: list-item;\\
 +
}\\
 +
#p-logo\\
 +
{\\
 +
display: none\\
 +
}\\
 +
#footer{\\
 +
margin-left: 0\\
 +
}\\
 +
\\
 +
.hotportlet .pBody\\
 +
{\\
 +
display: block\\
 +
}\\
 +
.hotportlet, #p-cactions.hotportlet, #p-personal.hotportlet\\
 +
{\\
 +
z-index:16!important\\
 +
}\\
 +
</style>");
 +
 +
var os;
 +
try{os = Gerbrant.hidePane.ownStyle;}catch(x){}
 +
if(!os)
 +
{
 +
 +
document.write("<style>\\
 +
.portlet .pBody, #p-cactions .pBody, #p-personal .pBody\\
 +
{\\
 +
background: #f9f9f9 url(/skins-1.5/monobook/headbg.jpg) 0 0 no-repeat;\\
 +
border: 1px solid #c0c0c0;\\
 +
padding: 0\\
 +
}\\
 +
.portlet *, #p-cactions *, #p-personal *\\
 +
{\\
 +
color: #000000\\
 +
}\\
 +
.portlet h5, #p-cactions h5, #p-personal h5\\
 +
{\\
 +
text-transform: none\\
 +
}\\
 +
#p-interaction h5\\
 +
{\\
 +
text-transform: capitalize\\
 +
}\\
 +
.portlet ul, #p-cactions ul, #p-personal ul\\
 +
{\\
 +
padding: 0;\\
 +
margin: 0;\\
 +
text-align: left;\\
 +
}\\
 +
.portlet li, #p-cactions li, #p-cactions li.selected, #p-personal li\\
 +
{\\
 +
display: block;\\
 +
background: none;\\
 +
border: none;\\
 +
padding-bottom: 0;\\
 +
margin: 0\\
 +
}\\
 +
.portlet li a, #p-cactions li a, #p-cactions li.selected a, #p-personal li a\\
 +
{\\
 +
display: block;\\
 +
background: none;\\
 +
color: #000000;\\
 +
border: none;\\
 +
text-transform: none;\\
 +
padding: 0 0.5em!important;\\
 +
}\\
 +
.portlet li a:visited\\
 +
{\\
 +
color: #000000;\\
 +
}\\
 +
.portlet li a:hover, #p-cactions li a:hover, #p-personal li a:hover\\
 +
{\\
 +
background: #3168b8;\\
 +
color: #ffffff;\\
 +
text-decoration: none\\
 +
}\\
 +
li#ca-watch, li#ca-unwatch\\
 +
{\\
 +
margin-left:0\\
 +
}\\
 +
li#pt-userpage, li#pt-anonuserpage\\
 +
{\\
 +
padding-left:0\\
 +
}\\
 +
#footer, #column-content #content\\
 +
{\\
 +
border-left:0\\
 +
}\\
 +
\\
 +
.hotportlet, #p-cactions.hotportlet, #p-personal.hotportlet\\
 +
{\\
 +
background: #3168b8\\
 +
}\\
 +
.hotportlet h5, #p-cactions.hotportlet h5, #p-personal.hotportlet h5,\\
 +
.hotportlet h5 *, #p-cactions.hotportlet h5 *, #p-personal.hotportlet h5 *\\
 +
{\\
 +
color: #ffffff\\
 +
}\\
 +
.ns-0 #p-cactions li a, .ns-0 #p-cactions li.selected a\\
 +
{\\
 +
background: none\\
 +
}\\
 +
.ns-0 #p-cactions li a:hover\\
 +
{\\
 +
background: #3168b8\\
 +
}\\
 +
\\
 +
/*IE fix*/\\
 +
#column-one, #p-cactions\\
 +
{\\
 +
z-index: auto\\
 +
}\\
 +
#p-navigation a\\
 +
{\\
 +
width: auto\\
 +
}\\
 +
.portlet li a\\
 +
{\\
 +
display: inline-block!important\\
 +
}\\
 +
</style>");
 +
 +
}
 +
 +
function setSize()
 +
{
 +
var tb = document.getElementById("p-lang");
 +
if(!tb) tb = document.getElementById("p-tb");
 +
document.getElementById("content").style.marginTop = tb.offsetTop + tb.offsetHeight + "px";
 +
}
 +
 +
function myContains(e)
 +
{
 +
do if(this === e) return true;
 +
while(e = e.parentNode);
 +
return false;
 +
}
 +
 +
addOnloadHook(function()
 +
{
 +
var h;
 +
function hideMenu()
 +
{
 +
h.className = h.className.replace(/ hotportlet\\b/, "");
 +
h = null;
 +
}
 +
function showMenu(e)
 +
{
 +
if(h)
 +
{
 +
if(h === e) return;
 +
hideMenu();
 +
}
 +
h = e;
 +
e.className += " hotportlet";
 +
}
 +
 +
setSize();
 +
(function(orig)
 +
{
 +
window.onresize = orig ? function()
 +
{
 +
setSize();
 +
orig.apply(this, arguments);
 +
} : setSize;
 +
})(window.onresize);
 +
var co = document.getElementById("column-one").childNodes;
 +
for(var i = 0; i < co.length; i++)
 +
{
 +
var p = co[i];
 +
if (/(?:^| )portlet(?:$| )/.test(p.className))
 +
{
 +
if(!p.contains) p.contains = myContains;
 +
p.onmouseover = function(e)
 +
{
 +
if(!e) e = event;
 +
f = e.fromElement;
 +
if(!f) f = e.relatedTarget;
 +
if(!f || !this.contains(f)) showMenu(this);
 +
};
 +
p.onmouseout = function(e)
 +
{
 +
if(!e) e = event;
 +
t = e.toElement;
 +
if(!t) t = e.relatedTarget;
 +
if(h && (!t || !this.contains(t))) hideMenu();
 +
};
 +
}
 +
}
 +
});

Current revision as of 23:13, 16 September 2008

document.write("<style>\\
.portlet, #p-cactions, #p-personal\\
{\\
	float: left;\\
	width: auto;\\
	height: auto;\\
	overflow: visible;\\
	position: relative;\\
	z-index: auto!important;\\
	left: auto;\\
	top: auto;\\
	text-align: center;\\
	line-height: normal;\\
	padding: 0 0.5em;\\
	margin: 0;\\
	font-size: 100%;\\
	white-space: nowrap;\\
	border-collapse: separate\\
}\\
.portlet h5, #p-cactions h5, #p-personal h5\\
{\\
	display:inline;\\
	white-space: nowrap;\\
	padding: 0;\\
	margin: 0\\
}\\
.portlet .pBody\\
{\\
	display: none;\\
}\\
.portlet .pBody, #p-cactions .pBody, #p-personal .pBody\\
{\\
	position: absolute;\\
	left: 0em;\\
	top: 1.1em;\\
	text-align: left;\\
	white-space: nowrap\\
}\\
#column-one\\
{\\
	position: absolute;\\
	left: 0;\\
	top: 0;\\
	padding: 0\\
}\\
#column-content\\
{\\
	float: none;\\
	margin: 0\\
}\\
#column-content #content\\
{\\
	margin: 1.1em 0 0 0;\\
	padding: 0 1em 1.5em 1em;\\
	margin-left: 0\\
}\\
#p-cactions li, #p-personal li\\
{\\
	display: list-item;\\
}\\
#p-logo\\
{\\
	display: none\\
}\\
#footer{\\
	margin-left: 0\\
}\\
\\
.hotportlet .pBody\\
{\\
	display: block\\
}\\
.hotportlet, #p-cactions.hotportlet, #p-personal.hotportlet\\
{\\
	z-index:16!important\\
}\\
</style>");
 
var os;
try{os = Gerbrant.hidePane.ownStyle;}catch(x){}
if(!os)
{
 
document.write("<style>\\
.portlet .pBody, #p-cactions .pBody, #p-personal .pBody\\
{\\
	background: #f9f9f9 url(/skins-1.5/monobook/headbg.jpg) 0 0 no-repeat;\\
	border: 1px solid #c0c0c0;\\
	padding: 0\\
}\\
.portlet *, #p-cactions *, #p-personal *\\
{\\
	color: #000000\\
}\\
.portlet h5, #p-cactions h5, #p-personal h5\\
{\\
	text-transform: none\\
}\\
#p-interaction h5\\
{\\
	text-transform: capitalize\\
}\\
.portlet ul, #p-cactions ul, #p-personal ul\\
{\\
	padding: 0;\\
	margin: 0;\\
	text-align: left;\\
}\\
.portlet li, #p-cactions li, #p-cactions li.selected, #p-personal li\\
{\\
	display: block;\\
	background: none;\\
	border: none;\\
	padding-bottom: 0;\\
	margin: 0\\
}\\
.portlet li a, #p-cactions li a, #p-cactions li.selected a, #p-personal li a\\
{\\
	display: block;\\
	background: none;\\
	color: #000000;\\
	border: none;\\
	text-transform: none;\\
	padding: 0 0.5em!important;\\
}\\
.portlet li a:visited\\
{\\
	color: #000000;\\
}\\
.portlet li a:hover, #p-cactions li a:hover, #p-personal li a:hover\\
{\\
	background: #3168b8;\\
	color: #ffffff;\\
	text-decoration: none\\
}\\
li#ca-watch, li#ca-unwatch\\
{\\
	margin-left:0\\
}\\
li#pt-userpage, li#pt-anonuserpage\\
{\\
	padding-left:0\\
}\\
#footer, #column-content #content\\
{\\
	border-left:0\\
}\\
\\
.hotportlet, #p-cactions.hotportlet, #p-personal.hotportlet\\
{\\
	background: #3168b8\\
}\\
.hotportlet h5, #p-cactions.hotportlet h5, #p-personal.hotportlet h5,\\
.hotportlet h5 *, #p-cactions.hotportlet h5 *, #p-personal.hotportlet h5 *\\
{\\
	color: #ffffff\\
}\\
.ns-0 #p-cactions li a, .ns-0 #p-cactions li.selected a\\
{\\
	background: none\\
}\\
.ns-0 #p-cactions li a:hover\\
{\\
	background: #3168b8\\
}\\
\\
/*IE fix*/\\
#column-one, #p-cactions\\
{\\
	z-index: auto\\
}\\
#p-navigation a\\
{\\
	width: auto\\
}\\
.portlet li a\\
{\\
	display: inline-block!important\\
}\\
</style>");
 
}
 
function setSize()
{
var tb = document.getElementById("p-lang");
if(!tb) tb = document.getElementById("p-tb");
document.getElementById("content").style.marginTop = tb.offsetTop + tb.offsetHeight + "px";
}
 
function myContains(e)
{
	do if(this === e) return true;
	while(e = e.parentNode);
	return false;
}
 
addOnloadHook(function()
{
	var h;
	function hideMenu()
	{
		h.className = h.className.replace(/ hotportlet\\b/, "");
		h = null;
	}
	function showMenu(e)
	{
		if(h)
		{
			if(h === e) return;
			hideMenu();
		}
		h = e;
		e.className += " hotportlet";
	}
 
	setSize();
	(function(orig)
	{
		window.onresize = orig ? function()
		{
			setSize();
			orig.apply(this, arguments);
		} : setSize;
	})(window.onresize);
	var co = document.getElementById("column-one").childNodes;
	for(var i = 0; i < co.length; i++)
	{
		var p = co[i];
		if (/(?:^| )portlet(?:$| )/.test(p.className))
		{
			if(!p.contains) p.contains = myContains;
			p.onmouseover = function(e)
			{
				if(!e) e = event;
				f = e.fromElement;
				if(!f) f = e.relatedTarget;
				if(!f || !this.contains(f)) showMenu(this);
			};
			p.onmouseout = function(e)
			{
				if(!e) e = event;
				t = e.toElement;
				if(!t) t = e.relatedTarget;
				if(h && (!t || !this.contains(t))) hideMenu();
			};
		}
	}
});
Personal tools