This page is fully protected because it provides interface text on this wiki.

MediaWiki:Gadget-layeredBlueprint.js

Jump to navigation Jump to search
In other languages

Note: After saving, you have to bypass your browser's cache to see the changes.

Google Chrome, Firefox, Microsoft Edge, and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button.
For details and instructions about other browsers, see Wikipedia:Bypass your cache.

mw.hook('wikipage.content').add(function($content) {
	$content.find('.layered-blueprint-tab').each(function (i, e) {
		var $e = $(e);
		var text = $e.text();

		var $input = $('<input>')
			.attr('id', $e.attr('id'))
			.attr('class', 'layered-blueprint-radio')
			.attr('name', $e.attr('data-name'))
			.attr('checked', $e.attr('data-checked'))
			.attr('type', 'radio');

		$e.replaceWith($input);

		var $label = $('<label>')
			.attr('for', $e.attr('id'))
			.attr('class', 'layered-blueprint-tab')
			.text(text);

		$label.insertAfter($input);
	});
});