User:Khaled Hatem/custom sidebar.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 () {
	var separator = ' / ';
	var metaFQDN = 'meta.wikimedia.org';
	$("div#p-tb").after(
		$(	'<div>',
			{
				'class': 'portal',
				'role': 'navigation',
				'id': 'p-privileged_users'
			}
		).append(
			$(	'<h3>',
				{
					'lang': 'en',
					'dir': 'ltr',
					'id': 'p-privileged_users-label',
					'text': 'Privileged users'
				}
			),
			$( '<div>', { 'class': 'body' } ).append(
				$( '<ul>' ).append(
					$( '<li>', { 'id': 't-privileged_users_links' } ).append(
						$(	'<a>',
							{
								'href': '/wiki/Special:ListUsers/sysop',
								'title': 'List admins at this wiki',
								'text': 'A'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:ListUsers/bureaucrat',
								'title': 'List bureaucrats at this wiki',
								'text': 'BC'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:ListUsers/checkuser',
								'title': 'List checkusers at this wiki',
								'text': 'CU'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:ListUsers/oversight',
								'title': 'List oversighters at this wiki',
								'text': 'OS'
							}
						)
					) /* li */
				) /* ul */
			) /* div */
		 ), /* div#p-privileged_users */
		$(	'<div>',
			{
				'class': 'portal',
				'role': 'navigation',
				'id': 'p-steward_tools'
			}
		).append(
			$(	'<h3>',
				{
					'lang': 'en',
					'dir': 'ltr',
					'id': 'p-steward_tools-label',
					'text': 'Steward Tools'
				}
			),
			$( '<div>', { 'class': 'body' } ).append(
				$( '<ul>' ).append(
					$( '<li>', { 'id': 't-steward_tools-gblock' } ).append(
						$(	'<a>',
							{
								'href': '//' + metaFQDN + '/wiki/Special:GlobalBlock',
								'title': 'Global Block for IP address',
								'text': 'Global Block'
							}
						)
					), /* li#t-steward_tools-gblock */
					$( '<li>', { 'id': 't-steward_tools-multilock' } ).append(
						$(	'<a>',
							{
								'href': '//' + metaFQDN + '/wiki/Special:MultiLock',
								'title': 'MultiLock for Global accounts',
								'text': 'MultiLock'
							}
						)
					) /* li#t-steward_tools-multilock */
				) /* ul */
			) /* div */
		), /* div#p-steward_tools */
		$(	'<div>',
			{
				'class': 'portal',
				'role': 'navigation',
				'id': 'p-quick_log_access'
			}
		).append(
			$(	'<h3>',
				{
					'lang': 'en',
					'dir': 'ltr',
					'id': 'p-quick_log_access-label',
					'text': 'Quick Log Access'
				}
			),
			$( '<div>', { 'class': 'body' } ).append(
				$( '<ul>' ).append(
					$( '<li>', { 'id': 't-quick_log_access-links' } ).append(
						$(	'<a>',
							{
								'href': '/wiki/Special:Logs/block',
								'title': 'Block Logs',
								'text': 'B'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:CheckUserLog',
								'title': 'CheckUser Logs',
								'text': 'C'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:Logs/delete',
								'title': 'Delete Logs',
								'text': 'D'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:Logs/protect',
								'title': 'Protect Logs',
								'text': 'P'
							}
						),
						separator,
						$(	'<a>',
							{
								'href': '/wiki/Special:Logs/suppress',
								'title': 'Suppress Logs',
								'text': 'S'
							}
						)
					) /* li#t-quick_log_access-links */
				) /* ul */
			) /* div */
		 ) /* div#p-quick_log_access */

	);
});