Jump to content

User:50829!/common.js

From Meta, a Wikimedia project coordination 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.
mw.loader.using('mediawiki.util').then(function() {
	$(function() {
		mw.util.addCSS('.mw-ui-icon-wikimedia-articleRedirect:before {background-image:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cg%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M5%201a2%202%200%2000-2%202v1c0%205%202%208%207%208V9l5%204-5%204v-3c-3.18%200-5.51-.85-7-2.68V17a2%202%200%20002%202h10a2%202%200%20002-2V3a2%202%200%2000-2-2z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E)}');
		mw.util.addPortletLink('p-personal', '/wiki/zh:', null, 'pt-diy', '中文维基百科', null, null);
		$('#pt-diy>a').html('<span>中文维基百科</span>').addClass('mw-ui-icon mw-ui-icon-before mw-ui-icon-wikimedia-articleRedirect')
	})
})