பயனர்:Shrikarsan/Wide Skin.js

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.

குறிப்பு - சேமித்த பின்னர், நீங்கள் செய்த மாற்றங்களைக் காண்பதற்கு உங்கள் உலவியின் இடைமாற்று அகற்றப்பட வேண்டும்.

  • மொஸில்லா பயர்பாக்ஸ் / சபாரி: Shift+Reload, அல்லது Ctrl-F5 அல்லது Ctrl-R (⌘-R Mac ல்)
  • கூகிள் குரோம் Ctrl-Shift-R அழுத்தவும். (⌘-Shift-R Mac ல்) ;
  • இண்டர்நெட் எக்ஸ்ப்ளோரர்: Ctrl-Refresh அல்லது Ctrl-F5 ஐ அழுத்தவும்.
  • ஒபேரா: Tools → Preferences இல் இடைமாற்றை அகற்றவும்;
// To make this script work you need to add the following to you style sheet (vector.css):
//  +--------------------------------------------------------------------+
//  |   #mw-panel { visibility: hidden !important; }                     |
//  |   #mw-head-base { margin-left: 0 !important; }                     |
//  |   #content { margin-left: 0 !important; }                          |
//  |   #left-navigation { margin-left: 1em !important; }                |
//  |   #footer { margin-left: 0 !important; }                           |
//  +--------------------------------------------------------------------+
// ie or firefox
var whichText = document.body.textContent ? 'textContent' : 'innerText';
 
if ( mw.config.get( 'skin' ) == 'vector' ) {
	if (document.readyState === "complete") { initWideSkin(); }
	else { addOnloadHook( initWideSkin ); }
}
 
 
// Insert head banner
myDiv = document.createElement("DIV");
myLink = document.createElement("A");
myDiv.appendChild(myLink);
 
myDiv.id = 'myNewBanner';
myDiv.setAttribute("style", "position: absolute; top: 5px; left: 15px; font: 31pt Times; font-variant: small-caps; z-index: 999999;");
myDiv.className = 'wideshow noprint';
 
myLink.href = mw.config.get( 'wgArticlePath' ).replace('$1',  mw.config.get( 'wgMainPageTitle' )).replace(/ /g, '_');
myLink.setAttribute("style", "color: black; text-decoration: none;");
var name = mw.config.get( 'wgSiteName' );
if(name == 'Wikipedia') { name = 'WikipediA'; }
myLink.innerHTML = name;
document.getElementById("mw-head").appendChild(myDiv);
 
function initWideSkin() {
	document.getElementById('mw-panel').style.visibility = 'hidden';
	document.getElementById('mw-head-base').style.marginLeft = '0px';
	document.getElementById('content').style.marginLeft = '0px';
	document.getElementById('left-navigation').style.marginLeft = '1em';
	document.getElementById('footer').style.marginLeft = '0px';
 
	// place certain (less used) links in the footer
	var forFoot = document.querySelectorAll("#t-permalink A, #t-cite A, #p-coll-print_export A");
	var foot = document.getElementById('footer-places');
	transferChildren2(forFoot, foot);
 
	// move toolbox to drop down menu
	// do this before creating icon menu
	transferChildren("#p-tb LI A", "p-cactions");
 
	// language links
	var langChildren = document.querySelectorAll("#p-lang UL A");
	if(langChildren != null && langChildren.length > 0) {
		var addLinks = document.querySelector('.wbc-editpage > a');
		if(addLinks != null) {
			addLinks.innerHTML = 'Add language links';
		}
 
		//list
		var langList = document.createElement("UL");
		langList.id = 'langList';
		langList.style.fontSize = "0.8em";
 
		// interwiki list
		transferChildren2(langChildren, langList);
 
        // language banner
		var lbanner = document.createElement("DIV");
		lbanner.id = "lbanner";
		lbanner.className = "catlinks noprint wideshow";
		lbanner.appendChild(langList);
 
		document.getElementById("content").appendChild(lbanner);
	}
 
	// Create a wiki menu for navigation and interactions links
	var newMenu = document.createElement("DIV");
	newMenu.id = 'faviconMenu';
	newMenu.className = 'vectorMenu wideshow';
	newMenu.innerHTML = '<h3><a href="#"></a></h3><div class="menu"><ul></ul></div>';
	newMenu.style.position = 'relative';
	newMenu.style.width = '25px';
	newMenu.style.backgroundPosition = "30% 60%";
 
	// image based on http://commons.wikimedia.org/wiki/File:W.svg
	var imageW = 'data:image/svg+xml;charset=UFT-8,' + escape('<svg width="16" height="11" xmlns="http://www.w3.org/2000/svg"><metadata id="metadata13">image/svg+xml</metadata><g><title>Layer 1</title><path fill="#000000" id="text2810" d="m0.10726,0.00002c-0.07595,0.00001 -0.10726,0.0843 -0.10726,0.23241c0,0.0581 0.0026,0.098 0.03575,0.14301c0.03319,0.045 0.06929,0.0715 0.10726,0.0715c0.44177,0.0529 0.7899,0.18658 1.03688,0.41118c0.24697,0.22462 0.49188,0.63172 0.71508,1.19776l3.55755,9.09946c0.03304,0.084599 0.10988,0.12514 0.21453,0.12514c0.08551,0 0.14939,-0.040601 0.19664,-0.12514l2.34191,-4.73744l2.037991,4.73744c0.04725,0.084599 0.11113,0.12514 0.19665,0.12514c0.10927,0 0.17285,-0.040601 0.196651,-0.12514l3.64693,-9.09946c0.23739,-0.60283 0.45612,-1.01938 0.67933,-1.23352c0.22319,-0.21411 0.50648,-0.33832 0.8581,-0.37542c0.04262,0.00001 0.08944,-0.0186 0.12514,-0.0715c0.03564,-0.0529 0.0536,-0.11551 0.0536,-0.17877c-0.00001,-0.12714 -0.040621,-0.19664 -0.107261,-0.19665c-0.22785,0 -0.483789,0.0217 -0.76872,0.0536c-0.27539,0.0316 -0.5061,0.0358 -0.71508,0.0358c-0.19945,0 -0.456349,-0.004 -0.75084,-0.0358c-0.318299,-0.0319 -0.58959,-0.0536 -0.82235,-0.0536c-0.08554,0.00001 -0.12515,0.0843 -0.12514,0.23241c-0.00001,0.14814 0.03221,0.21453 0.08939,0.21452c0.63655,0.0316 0.947471,0.30407 0.947491,0.82235c-0.00002,0.21688 -0.04794,0.45627 -0.143021,0.71508l-2.7352,7.07935l-1.85922,-4.20113l1.37654,-2.80671c0.337399,-0.65575 0.61469,-1.08419 0.84023,-1.26927c0.225499,-0.18507 0.52339,-0.2974 0.893849,-0.33967c0.104361,0.00001 0.16088,-0.0812 0.1609,-0.25028c-0.00002,-0.12714 -0.03261,-0.19664 -0.08939,-0.19665c-0.242351,0.00001 -0.53298,0.0165 -0.89386,0.0536c-0.284961,0.0265 -0.514211,0.0358 -0.66145,0.0358c-0.20408,0 -0.45045,-0.004 -0.76872,-0.0358c-0.33249,-0.0319 -0.63027,-0.0536 -0.8581,-0.0536c-0.02872,0.00001 -0.04313,0.0239 -0.07151,0.0715c-0.02843,0.0476 -0.05366,0.10799 -0.0536,0.1609c-0.00001,0.14814 0.03261,0.21453 0.089391,0.21452c0.63655,0.0316 0.94747,0.28207 0.94749,0.76872c-0.00002,0.20622 -0.05406,0.46763 -0.196651,0.76871l-1.03688,2.12738l-1.03687,-2.32402c-0.14726,-0.33304 -0.21453,-0.57418 -0.21453,-0.73297c0,-0.35433 0.31092,-0.56039 0.94749,-0.60782c0.04754,0.00001 0.0715,-0.0664 0.07151,-0.21452c-0.00001,-0.14812 -0.031011,-0.2324 -0.10726,-0.23241c-0.318001,0 -0.63752,0.0217 -0.96537,0.0536c-0.31828,0.0316 -0.62679,0.0358 -0.91173,0.0358c-0.28959,0 -0.56581,-0.004 -0.82235,-0.0358c-0.26582,-0.0319 -0.5577,-0.0536 -0.87598,-0.0536c-0.06639,0.00001 -0.08939,0.0843 -0.08939,0.23241c0,0.0581 0.0049,0.098 0.03575,0.14301c0.03087,0.045 0.07421,0.0715 0.10727,0.0715c0.36581,0.0423 0.64189,0.15202 0.82234,0.33967c0.18044,0.18767 0.39902,0.61868 0.67934,1.26927l1.57318,3.62906l-1.68045,3.521791l-2.94972,-7.419c-0.07624,-0.1904 -0.10727,-0.33797 -0.10727,-0.46481c0,-0.24848 0.08524,-0.45452 0.26816,-0.60782c0.18291,-0.15328 0.43256,-0.24171 0.75084,-0.26816c0.04753,0.00001 0.0715,-0.0664 0.07151,-0.21452c0,-0.14812 -0.04891,-0.2324 -0.12514,-0.23241c-0.31799,0 -0.67715,0.0217 -1.0905,0.0536c-0.39423,0.0316 -0.72942,0.0358 -1.019,0.0358c-0.28495,0 -0.58882,-0.004 -0.91173,-0.0358c-0.34669,-0.0319 -0.68284,-0.0536 -1.00112,-0.0536l0,0.00002z"/></g></svg>');
 
	newMenu.style.backgroundImage = 'url(' + imageW + ')';
	newMenu.style.backgroundRepeat = 'no-repeat';
	newMenu.style.backgroundPosition = '30% 60%';
 
	// Insert new menu
	var vectorMenu = document.getElementById('p-cactions');
	document.getElementById('right-navigation').insertBefore(newMenu, vectorMenu);
 
	// Save help for moment
	document.querySelector('#n-help A').className += ' used';
 
	// add menu items
	transferChildren(".portal LI A", "faviconMenu");
 
	// resurrect help
	var hclass = document.querySelector('#n-help A').className.replace(/used$/, '');
	document.querySelector('#n-help A').className = hclass;
 
	// Append help at end of icon menu
	transferChildren("#n-help A", "faviconMenu");
 
	// set some css for good and featured articles
	mw.util.addCSS( "#lbanner .GA:before { content: url('//upload.wikimedia.org/wikipedia/commons/4/42/Monobook-bullet-ga.png') ' '; } " );
	mw.util.addCSS( "#lbanner .FA:before { content: url('//upload.wikimedia.org/wikipedia/en/d/d4/Monobook-bullet-star.png') ' '; }" );
}
 
function transferChildren(fromSelector, toID) {
	var from = document.querySelectorAll(fromSelector);
	var to = document.getElementById(toID);
	var len = from.length;
 
	for(var i = 0; i < len; i++) {
		if(!from[i].className.match(/used/)) {
			var li = mw.util.addPortletLink(toID, from[i].href, from[i][whichText], null, from[i].title, from[i].accesskey);
			li.className += ' wideshow ' + from[i].parentNode.className;
			from[i].className += ' used';
		}
	}
}
 
function transferChildren2(from, to) {
//	takes objects
	var len = from.length;
 
	for(var i = 0; i < len; i++) {
		var a = document.createElement("A");
		a.href = from[i].href;
		a.innerHTML = from[i].innerHTML;
 
		var li = document.createElement("LI");
		li.className = 'noprint wideshow ' + from[i].parentNode.className;
		li.appendChild(a);
		to.appendChild(li);
 
		from[i].className += ' used';
	}
}
"https://ta.wikipedia.org/w/index.php?title=பயனர்:Shrikarsan/Wide_Skin.js&oldid=1617870" இலிருந்து மீள்விக்கப்பட்டது