Jump to content
Discussions

MediaWiki:Gadget-Discord.js

From Undertale Wiki

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
$('.vector-column-end .vector-sticky-pinned-container').prepend(
	$('<div>', {
		class: 'vector-menu mw-portlet',
		html: [
			$('<div>', {
				class: 'vector-menu-heading',
				text: mw.message('gadget-discord-title').plain()
			}),
			$('<div>', {
				class: 'vector-menu-content',
				html: [
					$('<p>', {
						html: mw.message('gadget-discord-text').parse()
					}),
					$('<div>', {
						class: 'center plainlinks',
						html: $('<a>', {
							href: mw.message('gadget-discord-invite').plain(),
							html: $('<span>', {
								class: 'cdx-button cdx-button--fake-button cdx-button--fake-button--enabled',
								html: [
									// [[File:Discord logo white.png|20px]]
									$('<img>', {
										src: '/images/thumb/Discord_logo_white.png/20px-Discord_logo_white.png.webp',
										alt: 'Discord logo',
										height: '15',
										width: '20'
									}),
									mw.message('gadget-discord-button').escaped()
								]
							})
						})
					})
				]
			})
		]
	})
);