Użytkownik:Michał56/common.js: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
(zbędne)
Znacznik: edytor źródłowy
M
Znacznik: edytor źródłowy
Linia 33: Linia 33:
};
};
}
}


snow_img = "data:image/png;base64,R0lGODlhGAAYALMAAP////z8/PHx8ezs7Nra2tnZ2djY2NfX19XV1c/Pz8PDwwAAAMDAwAAAAAAAAAAAACH5BAEAAAwALAAAAAAYABgAQAStkMlJq6Uqa8BB7ommeNbXCUACChejHOAwfGqXTUrd7XwfYoNEQhDacIotRorAUUhGS0LSCAgSj0gcEwQgQAeHz4AgTIRdMK9Mt1Mpxj9c5tpMnTQt0c2lT/JHe1B4eSqFIihlTiUZWx4EQSkhHooWHHQKW0MkFTmYIwM2UGaMCgJOOT2pqUU5hVefM6I7NyYmqh+eJWxCKJF7nJFHXiM6ppQVZDWKI0QJA37QLREAOw==";
snow_no = 15;
if (typeof(window.pageYOffset) == "number")
{
snow_browser_width = window.innerWidth;
snow_browser_height = window.innerHeight;
}
else if (document.body && (document.body.scrollLeft || document.body.scrollTop))
{
snow_browser_width = document.body.offsetWidth;
snow_browser_height = document.body.offsetHeight;
}
else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop))
{
snow_browser_width = document.documentElement.offsetWidth;
snow_browser_height = document.documentElement.offsetHeight;
}
else
{
snow_browser_width = 500;
snow_browser_height = 500;
}
snow_dx = [];
snow_xp = [];
snow_yp = [];
snow_am = [];
snow_stx = [];
snow_sty = [];
for (i = 0; i < snow_no; i++)
{
snow_dx[i] = 0;
snow_xp[i] = Math.random()*(snow_browser_width-50);
snow_yp[i] = Math.random()*snow_browser_height;
snow_am[i] = Math.random()*20;
snow_stx[i] = 0.02 + Math.random()/10;
snow_sty[i] = 0.7 + Math.random();
if (i > 0) document.write("<\div id=\"snow_flake"+ i +"\" style=\"position:absolute;z-index:"+i+"\"><\img src=\""+snow_img+"\" border=\"0\"><\/div>"); else document.write("<\div id=\"snow_flake0\" style=\"position:absolute;z-index:0\"><a href=\"http://peters1.dk/tools/snow.php\" target=\"_blank\"><\img src=\""+snow_img+"\" border=\"0\"></a><\/div>");
}
function SnowStart()
{
for (i = 0; i < snow_no; i++)
{
snow_yp[i] += snow_sty[i];
if (snow_yp[i] > snow_browser_height-50)
{
snow_xp[i] = Math.random()*(snow_browser_width-snow_am[i]-30);
snow_yp[i] = 0;
snow_stx[i] = 0.02 + Math.random()/10;
snow_sty[i] = 0.7 + Math.random();
}
snow_dx[i] += snow_stx[i];
document.getElementById("snow_flake"+i).style.top=snow_yp[i]+"px";
document.getElementById("snow_flake"+i).style.left=snow_xp[i] + snow_am[i]*Math.sin(snow_dx[i])+"px";
}
snow_time = setTimeout("SnowStart()", 10);
}
SnowStart();

Wersja z 20:15, 12 sty 2016

//skrypt zapobiegający znikaniu opcji ostatnich zmian
/*
* @autor - Michał56
*/
;(function($, mw){
 if (mw.config.get('wgCanonicalSpecialPageName') !== 'Recentchanges') return;

 if ($('#recentchanges-options').hasClass('collapsed')) {
 $('#recentchanges-options').toggleClass('collapsed');
 }
})(this.jQuery, this.mediaWiki);

//RollbackAll
importScript("User:Expert3222/RollbackAll.js");

//dodatkowe przyciski w edytorze
/* autor - Michał56 */

if (typeof (mwCustomEditButtons) != 'undefined') {
	mwCustomEditButtons[mwCustomEditButtons.length] = {
		"imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/26/Button_latinas.png",
	    "speedTip": "Wstaw polskie cudzysłowy",
	    "tagOpen": "„",
	    "tagClose": "”",
	    "sampleText": ""
	};
	mwCustomEditButtons[mwCustomEditButtons.length] = {
	    "imageFile": "https://upload.wikimedia.org/wikipedia/commons/3/3f/Button_headline_-_2.png",
	    "speedTip": "Wstaw półpauzę",
	    "tagOpen": "–",
	    "tagClose": "",
	    "sampleText": ""
	};
}


snow_img = "data:image/png;base64,R0lGODlhGAAYALMAAP////z8/PHx8ezs7Nra2tnZ2djY2NfX19XV1c/Pz8PDwwAAAMDAwAAAAAAAAAAAACH5BAEAAAwALAAAAAAYABgAQAStkMlJq6Uqa8BB7ommeNbXCUACChejHOAwfGqXTUrd7XwfYoNEQhDacIotRorAUUhGS0LSCAgSj0gcEwQgQAeHz4AgTIRdMK9Mt1Mpxj9c5tpMnTQt0c2lT/JHe1B4eSqFIihlTiUZWx4EQSkhHooWHHQKW0MkFTmYIwM2UGaMCgJOOT2pqUU5hVefM6I7NyYmqh+eJWxCKJF7nJFHXiM6ppQVZDWKI0QJA37QLREAOw==";
snow_no = 15;
if (typeof(window.pageYOffset) == "number")
{
	snow_browser_width = window.innerWidth;
	snow_browser_height = window.innerHeight;
} 
else if (document.body && (document.body.scrollLeft || document.body.scrollTop))
{
	snow_browser_width = document.body.offsetWidth;
	snow_browser_height = document.body.offsetHeight;
}
else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop))
{
	snow_browser_width = document.documentElement.offsetWidth;
	snow_browser_height = document.documentElement.offsetHeight;
}
else
{
	snow_browser_width = 500;
	snow_browser_height = 500;	
}
 
snow_dx = [];
snow_xp = [];
snow_yp = [];
snow_am = [];
snow_stx = [];
snow_sty = [];
 
for (i = 0; i < snow_no; i++) 
{ 
	snow_dx[i] = 0; 
	snow_xp[i] = Math.random()*(snow_browser_width-50);
	snow_yp[i] = Math.random()*snow_browser_height;
	snow_am[i] = Math.random()*20; 
	snow_stx[i] = 0.02 + Math.random()/10;
	snow_sty[i] = 0.7 + Math.random();
	if (i > 0) document.write("<\div id=\"snow_flake"+ i +"\" style=\"position:absolute;z-index:"+i+"\"><\img src=\""+snow_img+"\" border=\"0\"><\/div>"); else document.write("<\div id=\"snow_flake0\" style=\"position:absolute;z-index:0\"><a href=\"http://peters1.dk/tools/snow.php\" target=\"_blank\"><\img src=\""+snow_img+"\" border=\"0\"></a><\/div>");
}
 
function SnowStart() 
{ 
	for (i = 0; i < snow_no; i++) 
	{ 
		snow_yp[i] += snow_sty[i];
		if (snow_yp[i] > snow_browser_height-50) 
		{
			snow_xp[i] = Math.random()*(snow_browser_width-snow_am[i]-30);
			snow_yp[i] = 0;
			snow_stx[i] = 0.02 + Math.random()/10;
			snow_sty[i] = 0.7 + Math.random();
		}
		snow_dx[i] += snow_stx[i];
		document.getElementById("snow_flake"+i).style.top=snow_yp[i]+"px";
		document.getElementById("snow_flake"+i).style.left=snow_xp[i] + snow_am[i]*Math.sin(snow_dx[i])+"px";
	}
	snow_time = setTimeout("SnowStart()", 10);
}
SnowStart();