Difference between revisions of "MediaWiki:Common.js"

From PolyCraft World
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'main', groups: { list: { tools: {...")
(No difference)

Revision as of 01:31, 11 December 2018

/* Any JavaScript here will be loaded for all users on every page load. */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
	section: 'main',
	groups: {
		list: {
			tools: {
				templates: {
					label: 'Templates',
					type: 'select',
					list: {
						'Ping-button': {
							label: '{{Ping}}',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{{Ping|',
									post: '}}'
								}
							}
						},
						'Clear-button': {
							label: 'Clear',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{{Clear}}'
								}
							}
						},
						'Done-button': {
							label: 'Done',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{{Done}}'
								}
							}
						}
					}
				}
			}
		}
	}
} );