ਮੀਡੀਆਵਿਕੀ:Gadget-Blockcenter.js

ਵਿਕੀਸਰੋਤ ਤੋਂ

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

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
$(function(){
	$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
		pathoschild.TemplateScript.add([
			{
				name: 'Block center to header',
				script: function(editor) {
				editor
					.replace('{{block center|', '')
					.replace('{{Block center|', '')
					.replace('{{Bc|', '')
					.replace('{{center block}}', '')
					.replace('{{Center block}}', '');
		    
				editor.forField('#wpHeaderTextbox')
					.append('{{Block center/s}}');
		    
				editor.forField('#wpFooterTextbox')
					.append('{{Block center/e}}');
				}
			}
		]);
	});
});