Użytkownik:Expert3222/common.js: Różnice pomiędzy wersjami

Z Nondanych
m
m
 
(Nie pokazano 19 pośrednich wersji utworzonych przez tego samego użytkownika)
Linia 4: Linia 4:
mw.loader.load('/wiki/Użytkownik:Expert3222/CR.js?action=raw&ctype=text/javascript');
mw.loader.load('/wiki/Użytkownik:Expert3222/CR.js?action=raw&ctype=text/javascript');


function callback()
var callback = function()
{
{
$(".mw-title a").text($(this).text() + " test");
$(".mw-title a").text($(this).text() + " test");
}
};

var popup;


$(function()
$(function()
{
{
mw.loader.using("oojs-ui", function()
if (mw.config.get("wgCanonicalSpecialPageName") == "Recentchanges")
{
{
/*// A PopupWidget.
var callbacks = [callback];
popup = new OO.ui.PopupWidget( {
var f = OO.ui.CheckboxInputWidget.prototype.setSelected;
$content: $( '<p>Hi there!</p>' ),
OO.ui.CheckboxInputWidget.prototype.setSelected = function(state, internal)
padded: true,
width: 300,
height: 300,
} );
$( "#firstHeading" ).append( popup.$element );
// To display the popup, toggle the visibility to 'true'.
popup.toggle( true );*/
/*var numCalls = 4;
var currentCall = 0;
if (mw.config.get("wgCanonicalSpecialPageName") == "Recentchanges")
{
{
var callbacks = [];
f.call(this, state, internal);
console.dir(this);
callbacks.push(callback);
var f = OO.ui.CheckboxInputWidget.prototype.setSelected;
console.dir(state);
OO.ui.CheckboxInputWidget.prototype.setSelected = function(state, internal)
console.dir(internal);
};
{
f.call(this, state, internal);
}
++currentCall;
if (currentCall == numCalls)
{
currentCall = 0;
callbacks.forEach(function(callback)
{
callback();
});
}
console.dir(this);
return this;
};
}*/
});
});
});

Aktualna wersja na dzień 15:19, 8 cze 2020

$('div#p-personal>ul').prepend("<li><a href='/wiki/Specjalna:ApiSandbox'>api sandbox</a></li><li><a href='/wiki/Użytkownik:" + mw.config.get('wgUserName') + "/common.js'>common.js</a></li>");

mw.loader.load('/wiki/Użytkownik:Expert3222/quickPatrol.js?action=raw&ctype=text/javascript');
mw.loader.load('/wiki/Użytkownik:Expert3222/CR.js?action=raw&ctype=text/javascript');

var callback = function()
{
	$(".mw-title a").text($(this).text() + " test");
};

var popup;

$(function()
{
	mw.loader.using("oojs-ui", function()
	{
		/*// A PopupWidget.
		popup = new OO.ui.PopupWidget( {
		    $content: $( '<p>Hi there!</p>' ),
		    padded: true,
		    width: 300,
		    height: 300,
		} );
		
		$( "#firstHeading" ).append( popup.$element );
		// To display the popup, toggle the visibility to 'true'.
		popup.toggle( true );*/
		
		/*var numCalls = 4;
		var currentCall = 0;
		if (mw.config.get("wgCanonicalSpecialPageName") == "Recentchanges")
		{
			var callbacks = [];
			callbacks.push(callback);
			var f = OO.ui.CheckboxInputWidget.prototype.setSelected;
			OO.ui.CheckboxInputWidget.prototype.setSelected = function(state, internal)
			{
				f.call(this, state, internal);
				++currentCall;
				if (currentCall == numCalls)
				{
					currentCall = 0;
					callbacks.forEach(function(callback)
					{
						callback();
					});
				}
				console.dir(this);
				return this;
			};
		}*/
	});
});